javax.persistence.OrderBy Java Examples

The following examples show how to use javax.persistence.OrderBy. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Race.java    From pikatimer with GNU General Public License v3.0 5 votes vote down vote up
@OneToMany(mappedBy="race",cascade={CascadeType.PERSIST, CascadeType.REMOVE},fetch = FetchType.EAGER)
@OrderBy("split_seq_number")
@Fetch(FetchMode.SELECT)
public List<Split> getSplits() {
    return raceSplitList;
    //return raceSplits.sorted((Split o1, Split o2) -> o1.getPosition().compareTo(o2.getPosition()));
}
 
Example #2
Source File: BusinessEntity.java    From juddi with Apache License 2.0 5 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessEntity")
@OrderBy
public List<Contact> getContacts() {
               if (this.contacts==null)
                       this.contacts = new ArrayList<Contact>();
	return this.contacts;
}
 
Example #3
Source File: ReplicationConfiguration.java    From juddi with Apache License 2.0 5 votes vote down vote up
/**
 * Gets the value of the serialNumber property.
 *
 */
@Column(name = "serialnumb")
@OrderBy(value = "SerialNumber DESC")
@Id
public Long getSerialNumber() {
        return serialNumber;
}
 
Example #4
Source File: User.java    From tianti with Apache License 2.0 5 votes vote down vote up
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "org_user_role_rel", 
		joinColumns = {@JoinColumn(name = "user_id")}, 
		inverseJoinColumns = {@JoinColumn(name = "role_id")})
@Where(clause="delete_flag=0")
@OrderBy("no")
public Set<Role> getRoles() {
	return roles;
}
 
Example #5
Source File: JPAOverriddenAnnotationReader.java    From lams with GNU General Public License v2.0 5 votes vote down vote up
private void getOrderBy(List<Annotation> annotationList, Element element) {
	Element subelement = element != null ? element.element( "order-by" ) : null;
	if ( subelement != null ) {
		AnnotationDescriptor ad = new AnnotationDescriptor( OrderBy.class );
		copyStringElement( subelement, ad, "value" );
		annotationList.add( AnnotationFactory.create( ad ) );
	}
}
 
Example #6
Source File: MetadataTable.java    From youkefu with Apache License 2.0 5 votes vote down vote up
/**
 * @return the tableproperty
 */
@Where(clause="impfield=0")	//不载入 设置为 禁用 导入导出的字段
@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.EAGER)
@JoinColumn(name = "dbtableid")
@OrderBy("sortindex")
public List<TableProperties> getTableproperty() {
	return tableproperty;
}
 
Example #7
Source File: Module.java    From dubai with MIT License 4 votes vote down vote up
@OneToMany(mappedBy = "module", fetch = FetchType.LAZY)
@OrderBy("displayOrder ASC")
public Set<MenuGroup> getMenuGroups() {
    return menuGroups;
}
 
Example #8
Source File: BpmCategory.java    From lemon with Apache License 2.0 4 votes vote down vote up
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "bpmCategory")
@OrderBy("priority")
public Set<BpmProcess> getBpmProcesses() {
    return this.bpmProcesses;
}
 
Example #9
Source File: Module.java    From OA with GNU General Public License v3.0 4 votes vote down vote up
@OneToMany(mappedBy="pid",cascade={CascadeType.ALL})
@OrderBy("id asc")
public Set<Module> getModules() {
	return modules;
}
 
Example #10
Source File: ReplicationConfiguration.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "replicationConfiguration")
@OrderBy
public List<Signature> getSignatures() {
        return signatures;
}
 
Example #11
Source File: KeyInfo.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "keyInfo")
@OrderBy
public List<KeyDataValue> getKeyDataValue() {
    return keyDataValue;
}
 
Example #12
Source File: PlmRequirement.java    From lemon with Apache License 2.0 4 votes vote down vote up
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "plmRequirement")
@OrderBy("priority")
public Set<PlmRequirement> getPlmRequirements() {
    return this.plmRequirements;
}
 
Example #13
Source File: Perm.java    From lemon with Apache License 2.0 4 votes vote down vote up
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "perm")
@OrderBy("priority")
public Set<Perm> getPerms() {
    return this.perms;
}
 
Example #14
Source File: PermType.java    From lemon with Apache License 2.0 4 votes vote down vote up
/** @return . */
@OneToMany(fetch = FetchType.LAZY, mappedBy = "permType")
@OrderBy("priority")
public Set<Perm> getPerms() {
    return this.perms;
}
 
Example #15
Source File: Dimension.java    From youkefu with Apache License 2.0 4 votes vote down vote up
@OneToMany(fetch = FetchType.EAGER)
@JoinColumn(name = "dimid",insertable=false,updatable=false)
@OrderBy("sortindex")
public List<CubeLevel> getCubeLevel() {
	return cubeLevel;
}
 
Example #16
Source File: Module.java    From OA with GNU General Public License v3.0 4 votes vote down vote up
@ManyToOne(cascade={CascadeType.ALL},fetch=FetchType.LAZY)
@JoinColumn(name="pid",referencedColumnName="id")
@OrderBy("pid asc")
public Module getPid() {
	return pid;
}
 
Example #17
Source File: Tmodel.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
@OrderBy
public List<TmodelDescr> getTmodelDescrs() {
	return this.tmodelDescrs;
}
 
Example #18
Source File: Contact.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
@OrderBy
public List<ContactDescr> getContactDescrs() {
	return this.contactDescrs;
}
 
Example #19
Source File: Tmodel.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "tmodel")
@OrderBy
public List<OverviewDoc> getOverviewDocs() {
	return this.overviewDocs;
}
 
Example #20
Source File: BindingTemplate.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bindingTemplate")
@OrderBy
       public List<Signature> getSignatures() {
               return signatures;
       }
 
Example #21
Source File: BindingTemplate.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bindingTemplate")
@OrderBy
public List<BindingDescr> getBindingDescrs() {
	return this.bindingDescrs;
}
 
Example #22
Source File: BindingTemplate.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "bindingTemplate")
@OrderBy
public List<TmodelInstanceInfo> getTmodelInstanceInfos() {
	return this.tmodelInstanceInfos;
}
 
Example #23
Source File: BusinessService.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
@OrderBy
       public List<Signature> getSignatures() {
               return signatures;
       }
 
Example #24
Source File: BusinessService.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
@OrderBy
public List<BindingTemplate> getBindingTemplates() {
	return this.bindingTemplates;
}
 
Example #25
Source File: BusinessService.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
@OrderBy
public List<ServiceDescr> getServiceDescrs() {
	return this.serviceDescrs;
}
 
Example #26
Source File: BusinessService.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "businessService")
@OrderBy
public List<ServiceName> getServiceNames() {
	return this.serviceNames;
}
 
Example #27
Source File: Contact.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
@OrderBy
public List<Address> getAddresses() {
	return this.addresses;
}
 
Example #28
Source File: Contact.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
@OrderBy
public List<Phone> getPhones() {
	return this.phones;
}
 
Example #29
Source File: Contact.java    From juddi with Apache License 2.0 4 votes vote down vote up
@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "contact")
@OrderBy
public List<Email> getEmails() {
	return this.emails;
}
 
Example #30
Source File: Resource.java    From base-framework with Apache License 2.0 4 votes vote down vote up
/**
 * 获取子类资源
 * 
 * @return List
 */
@OrderBy("sort ASC")
@OneToMany(mappedBy = "parent",fetch = FetchType.LAZY,cascade={CascadeType.ALL})
public List<Resource> getChildren() {
	return children;
}