本文整理匯總了Java中javax.persistence.OrderBy類的典型用法代碼示例。如果您正苦於以下問題:Java OrderBy類的具體用法?Java OrderBy怎麽用?Java OrderBy使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
OrderBy類屬於javax.persistence包,在下文中一共展示了OrderBy類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getSerialNumber
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* Gets the value of the serialNumber property.
*
*/
@Column(name = "serialnumb")
@OrderBy(value = "SerialNumber DESC")
@Id
public Long getSerialNumber() {
return serialNumber;
}
示例2: getPassos
import javax.persistence.OrderBy; //導入依賴的package包/類
@LazyCollection(LazyCollectionOption.FALSE)
@OneToMany(mappedBy="aula", cascade=CascadeType.ALL)
@JoinColumn(name="aula_id")
@OrderBy("ordem")
public List<Passo> getPassos() {
return passos;
}
示例3: getOrderBy
import javax.persistence.OrderBy; //導入依賴的package包/類
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 ) );
}
}
示例4: getRoles
import javax.persistence.OrderBy; //導入依賴的package包/類
@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;
}
示例5: getComments
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* Get all comments for current blog entry.
*
* @return List of all comments for current blog entry.
*/
@OneToMany(mappedBy = "blogEntry", fetch = FetchType.LAZY,
cascade = CascadeType.PERSIST, orphanRemoval = true)
@OrderBy("postedOn")
public List<BlogComment> getComments() {
return comments;
}
示例6: getEntries
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* Gets all blog entries for which current user is author.
*
* @return List of current user blog entries.
*/
@OneToMany(mappedBy = "creator", fetch = FetchType.LAZY,
cascade = CascadeType.PERSIST, orphanRemoval = true)
@OrderBy("createdAt")
public List<BlogEntry> getEntries() {
return entries;
}
示例7: getFavoriteProducts
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取收藏商品
*
* @return 收藏商品
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_member_favorite_product")
@OrderBy("createDate desc")
public Set<Product> getFavoriteProducts() {
return favoriteProducts;
}
示例8: getParameters
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取參數
*
* @return 參數
*/
@JsonProperty
@Valid
@NotEmpty
@OneToMany(mappedBy = "parameterGroup", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("order asc")
public List<Parameter> getParameters() {
return parameters;
}
示例9: getOrderItems
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取訂單項
*
* @return 訂單項
*/
@Valid
@NotEmpty
@OneToMany(mappedBy = "order", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("isGift asc")
public List<OrderItem> getOrderItems() {
return orderItems;
}
示例10: getBrands
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取篩選品牌
*
* @return 篩選品牌
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_category_brand")
@OrderBy("order asc")
public Set<Brand> getBrands() {
return brands;
}
示例11: getShippingMethods
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取支持配送方式
*
* @return 支持配送方式
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_payment_shipping_method")
@OrderBy("order asc")
public Set<ShippingMethod> getShippingMethods() {
return shippingMethods;
}
示例12: getSpecificationValues
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取規格值
*
* @return 規格值
*/
@Valid
@NotEmpty
@OneToMany(mappedBy = "specification", fetch = FetchType.LAZY, cascade = CascadeType.ALL, orphanRemoval = true)
@OrderBy("order asc")
public List<SpecificationValue> getSpecificationValues() {
return specificationValues;
}
示例13: getTags
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取標簽
*
* @return 標簽
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_article_tag")
@OrderBy("order asc")
public Set<Tag> getTags() {
return tags;
}
示例14: getTags
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取標簽
*
* @return 標簽
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_tag")
@OrderBy("order asc")
public Set<Tag> getTags() {
return tags;
}
示例15: getSpecifications
import javax.persistence.OrderBy; //導入依賴的package包/類
/**
* 獲取規格
*
* @return 規格
*/
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_specification")
@OrderBy("order asc")
public Set<Specification> getSpecifications() {
return specifications;
}