Example usage for org.hibernate.annotations SortType NATURAL

List of usage examples for org.hibernate.annotations SortType NATURAL

Introduction

In this page you can find the example usage for org.hibernate.annotations SortType NATURAL.

Prototype

SortType NATURAL

To view the source code for org.hibernate.annotations SortType NATURAL.

Click Source Link

Document

The collection is sorted using its natural sorting.

Usage

From source file:com.benfante.minimark.po.Question.java

License:Apache License

@OneToMany(mappedBy = "question", cascade = { CascadeType.ALL })
@Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
@Sort(type = SortType.NATURAL)
public SortedSet<TagQuestionLink> getTags() {
    return tags;/* w w  w . ja v a  2  s .c  o  m*/
}

From source file:com.gtwm.pb.auth.Company.java

License:Open Source License

@ElementCollection(fetch = FetchType.EAGER)
@Sort(type = SortType.NATURAL)
private SortedSet<Long> getChartIdsForDashboardDirect() {
    return this.chartIdsForDashboard;
}

From source file:com.gtwm.pb.auth.Company.java

License:Open Source License

@ElementCollection(fetch = FetchType.EAGER)
@Sort(type = SortType.NATURAL)
private SortedSet<Long> getChartIdsNotForDashboardDirect() {
    return this.chartIdsNotForDashboard;
}

From source file:com.hmsinc.epicenter.model.analysis.classify.Classifier.java

License:Open Source License

/**
 * @return the classifications/*  ww w  .ja va  2s.  c o  m*/
 */
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.EAGER, mappedBy = "classifier")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Fetch(FetchMode.JOIN)
@Sort(type = SortType.NATURAL)
public SortedSet<Classification> getClassifications() {
    return classifications;
}

From source file:com.hmsinc.epicenter.model.geography.County.java

License:Open Source License

/**
 * @return the zipcodes//  w w  w  . j  a va  2  s . c  o  m
 */
@XmlElementWrapper(name = "zipcodes", namespace = "http://epicenter.hmsinc.com/model")
@XmlElement(name = "zipcode", namespace = "http://epicenter.hmsinc.com/model")
@ManyToMany(cascade = { CascadeType.PERSIST,
        CascadeType.MERGE }, fetch = FetchType.LAZY, targetEntity = Zipcode.class)
@JoinTable(name = "GEO_COUNTY_ZIPCODE", joinColumns = {
        @JoinColumn(name = "ID_GEO_COUNTY") }, inverseJoinColumns = { @JoinColumn(name = "ID_GEO_ZIPCODE") })
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.hmsinc.epicenter.model.GeographyCache")
@ForeignKey(name = "FK_GEO_COUNTY_ZIPCODE_1")
@Sort(type = SortType.NATURAL)
public Set<Zipcode> getZipcodes() {
    return zipcodes;
}

From source file:com.hmsinc.epicenter.model.geography.State.java

License:Open Source License

/**
 * @return the counties/* w w  w .j  ava2s .  com*/
 */
@XmlElementWrapper(name = "counties", namespace = "http://epicenter.hmsinc.com/model")
@XmlElement(name = "county", namespace = "http://epicenter.hmsinc.com/model")
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "state")
@Where(clause = "type = 'C'")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.hmsinc.epicenter.model.GeographyCache")
@Sort(type = SortType.NATURAL)
public Set<County> getCounties() {
    return counties;
}

From source file:com.hmsinc.epicenter.model.geography.State.java

License:Open Source License

/**
 * @return the zipcodes/*from w w  w  .j  a  va2  s .  c  o  m*/
 */
@XmlTransient
@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "state")
@Where(clause = "type = 'Z'")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.hmsinc.epicenter.model.GeographyCache")
@Sort(type = SortType.NATURAL)
public Set<Zipcode> getZipcodes() {
    return zipcodes;
}

From source file:com.hmsinc.epicenter.model.geography.Zipcode.java

License:Open Source License

/**
 * @return the counties//ww  w . j  a v  a  2 s.c  o  m
 */
@XmlTransient
@ManyToMany(mappedBy = "zipcodes", targetEntity = County.class)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE, region = "com.hmsinc.epicenter.model.GeographyCache")
@ForeignKey(name = "FK_GEO_COUNTY_ZIPCODE_2")
@Sort(type = SortType.NATURAL)
public Set<County> getCounties() {
    return counties;
}

From source file:com.hmsinc.epicenter.model.health.Patient.java

License:Open Source License

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "patient")
@Sort(type = SortType.NATURAL)
public SortedSet<PatientDetail> getPatientDetails() {
    return this.patientDetails;
}

From source file:com.hmsinc.epicenter.model.health.Patient.java

License:Open Source License

@OneToMany(cascade = { CascadeType.ALL }, fetch = FetchType.LAZY, mappedBy = "patient")
@Sort(type = SortType.NATURAL)
public SortedSet<Interaction> getInteractions() {
    return this.interactions;
}