微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

javax.persistence.OrderBy的实例源码

项目:@H_404_2@juddi    文件:@H_404_2@ReplicationConfiguration.java   
/**
 * Gets the value of the serialNumber property.
 *
 */
@Column(name = "serialnumb")
@OrderBy(value = "SerialNumber DESC")
@Id
public Long getSerialNumber() {
        return serialNumber;
}
项目:@H_404_2@lams    文件:@H_404[email protected]   
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 ) );
    }
}
项目:@H_404_2@tianti    文件:@H_404[email protected]   
@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;
}
项目:@H_404_2@java-course    文件:@H_404[email protected]   
/**
 * 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;
}
项目:@H_404_2@java-course    文件:@H_404[email protected]   
/**
 * Gets all blog entries for which current user is author.
 * 
 * @return List of current user blog entries.
 */
@OnetoMany(mappedBy = "creator",orphanRemoval = true)
@OrderBy("createdAt")
public List<BlogEntry> getEntries() {
    return entries;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取收藏商品
 * 
 * @return 收藏商品
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_member_favorite_product")
@OrderBy("createDate desc")
public Set<Product> getFavoriteProducts() {
    return favoriteProducts;
}
项目:@H_404_2@my-paper    文件:@H_404_2@ParameterGroup.java   
/**
 * 获取参数
 * 
 * @return 参数
 */
@JsonProperty
@Valid
@NotEmpty
@OnetoMany(mappedBy = "parameterGroup",cascade = CascadeType.ALL,orphanRemoval = true)
@OrderBy("order asc")
public List<Parameter> getParameters() {
    return parameters;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取订单项
 * 
 * @return 订单项
 */
@Valid
@NotEmpty
@OnetoMany(mappedBy = "order",orphanRemoval = true)
@OrderBy("isgift asc")
public List<OrderItem> getorderItems() {
    return orderItems;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取筛选品牌
 * 
 * @return 筛选品牌
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_category_brand")
@OrderBy("order asc")
public Set<Brand> getBrands() {
    return brands;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取支持配送方式
 * 
 * @return 支持配送方式
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_payment_shipping_method")
@OrderBy("order asc")
public Set<ShippingMethod> getShippingMethods() {
    return shippingMethods;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取规格值
 * 
 * @return 规格值
 */
@Valid
@NotEmpty
@OnetoMany(mappedBy = "specification",orphanRemoval = true)
@OrderBy("order asc")
public List<SpecificationValue> getSpecificationValues() {
    return specificationValues;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取标签
 * 
 * @return 标签
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_article_tag")
@OrderBy("order asc")
public Set<Tag> getTags() {
    return tags;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取标签
 * 
 * @return 标签
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_tag")
@OrderBy("order asc")
public Set<Tag> getTags() {
    return tags;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取规格
 * 
 * @return 规格
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_specification")
@OrderBy("order asc")
public Set<Specification> getSpecifications() {
    return specifications;
}
项目:@H_404_2@my-paper    文件:@H_404[email protected]   
/**
 * 获取规格值
 * 
 * @return 规格值
 */
@ManyToMany(fetch = FetchType.LAZY)
@JoinTable(name = "xx_product_specification_value")
@OrderBy("specification asc")
public Set<SpecificationValue> getSpecificationValues() {
    return specificationValues;
}
项目:@H_404_2@SpringBBS    文件:@H_404[email protected]   
@ManyToMany
@JoinTable(name = "user_badge",joinColumns = { @JoinColumn(name = "user_id") },inverseJoinColumns = { @JoinColumn(name = "badge_id") })
@Fetch(FetchMode.SUBSELECT)
@OrderBy("id")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public Set<Badge> getBadges() {
    return badges;
}
项目:@H_404_2@SpringBBS    文件:@H_404[email protected]   
@ManyToMany
//�м����,��������Ĭ����������
@JoinTable(name = "ACCT_USER_ROLE",joinColumns = { @JoinColumn(name = "USER_ID") },inverseJoinColumns = { @JoinColumn(name = "ROLE_ID") })
//Fecth���Զ���
@Fetch(FetchMode.SUBSELECT)
//���ϰ�id����.
@OrderBy("id")
//�����ж���id�Ļ���.
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
public List<AcctRole> getRoleList() {
    return roleList;
}
项目:@H_404_2@alex    文件:@H_404[email protected]   
/**
 * Get the Actions related to the Symbol.
 *
 * @return The actions of this Symbol
 */
@OnetoMany(
        mappedBy = "symbol",cascade = {CascadeType.ALL})
@OrderBy("number ASC")
@JsonProperty
public List<SymbolAction> getActions() {
    return actions;
}
项目:@H_404_2@alex    文件:@H_404[email protected]   
/**
 * @return Get the steps of the result.
 */
@OnetoMany(
        mappedBy = "result",orphanRemoval = true
)
@OrderBy("stepNo ASC")
public List<LearnerResultStep> getSteps() {
    return steps;
}
项目:@H_404_2@eMonocot    文件:@H_404[email protected]   
/**
 * @return the comments
 */
@OnetoMany(fetch = FetchType.LAZY,orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'IdentificationKey'")
@Cascade({ CascadeType.SAVE_UPDATE,CascadeType.MERGE,CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:@H_404_2@eMonocot    文件:@H_404[email protected]   
/**
 * @return the comments
 */
@OnetoMany(fetch = FetchType.LAZY,orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Concept'")
@Cascade({ CascadeType.SAVE_UPDATE,CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:@H_404_2@eMonocot    文件:@H_404_2@PhylogeneticTree.java   
@OnetoMany(fetch = FetchType.LAZY,orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'PhylogeneticTree'")
@Cascade({ CascadeType.SAVE_UPDATE,CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:@H_404_2@eMonocot    文件:@H_404[email protected]   
@OnetoMany(fetch = FetchType.LAZY,orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Image'")
@Cascade({ CascadeType.SAVE_UPDATE,CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:@H_404_2@eMonocot    文件:@H_404[email protected]   
/**
 * @return the jobs
 */
@JsonIgnore
@OnetoMany(fetch = FetchType.LAZY,mappedBy = "organisation")
@Cascade(CascadeType.DELETE)
@OrderBy("lastHarvested DESC")
public Set<Resource> getResources() {
 return resources;
}
项目:@H_404_2@eMonocot    文件:@H_404[email protected]   
/**
 * @return the comments
 */
@OnetoMany(fetch = FetchType.LAZY,orphanRemoval = true)
@JoinColumn(name = "commentPage_id")
@OrderBy("created DESC")
@Where(clause = "commentPage_type = 'Taxon'")
@Cascade({ CascadeType.SAVE_UPDATE,CascadeType.DELETE })
@JsonIgnore
public List<Comment> getComments() {
    return comments;
}
项目:@H_404_2@Project-H-Backend    文件:@H_404[email protected]   
/**
 * @return questions
 */
@OnetoMany(fetch = FetchType.LAZY,mappedBy = "haq",cascade=CascadeType.ALL,orphanRemoval=true)
@OrderBy("sortOrder")
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public List<com.mobileman.projecth.domain.questionary.Question> getQuestions() {
    return this.questions;
}
项目:@H_404_2@powop    文件:@H_404[email protected]   
/**
 * @return a list of images of the taxon
 */
@ManyToMany(fetch = FetchType.LAZY,mappedBy = "taxa")
@JsonSerialize(contentUsing = ImageSerializer.class)
@OrderBy("rating DESC")
public List<Image> getimages() {
    return images;
}
项目:@H_404_2@omr    文件:@H_404[email protected]   
@JazzProp(name="Questões",renderer=JazzRenderer.SUBMODULE,listable=false,searchable=false)
@ManyToMany(cascade=CascadeType.ALL,fetch=FetchType.EAGER)
@Size(min=1,message="Adicione pelo menos uma questão!")
@NotEmpty(message="Adicione pelo menos uma questão!")
@Valid()
@Fetch(FetchMode.SELECT)//coloquei este fetch pq o hibernate vai multiplicar os resultados,por nao se tratar de um set. Estúpido!
@OrderBy("ordem")
public List<QuestionVO> getQuestions() {
    return questions;
}
项目:@H_404_2@omr    文件:@H_404[email protected]   
@JazzProp(name="Quest��es",message="Adicione pelo menos uma quest�o!")
@NotEmpty(message="Adicione pelo menos uma quest�o!")
@Valid()
@Fetch(FetchMode.SELECT)//coloquei este fetch pq o hibernate vai multiplicar os resultados,por nao se tratar de um set. Est�pido!
@OrderBy("ordem")
@Navigable(alias="perg",visitorClass=ShuffleQuestionsVisitor.class)
public List<QuestionVO> getQuestions() {
    return questions;
}
项目:@H_404_2@omr    文件:@H_404[email protected]   
@JazzProp(name="Questões",fetch=FetchType.EAGER)
//@Column(nullable=true) retirei em 110611 nao faz sentido
@Size(min=1,message="Adicione pelo menos uma questão!")
@Valid
@Fetch(FetchMode.SELECT)//coloquei este fetch pq o hibernate vai multiplicar os resultados,por nao se tratar de um set. Estúpido!
@OrderBy("ordem")
public List<QuestionVO> getQuestions() {
    return questions;
}
项目:@H_404_2@ef-orm    文件:@H_404_2@MetaHolder.java   
private static JoinPath processJoin(AbstractMetadata thisMeta,ITableMetadata target,AnnotationProvider field,JoinColumn... jj) {
    List<JoinKey> result = new ArrayList<JoinKey>();

    String fieldName = field.getName();
    for (JoinColumn j : jj) {
        if (StringUtils.isBlank(j.name())) {
            throw new IllegalArgumentException("Invalid reference [" + thisMeta.getThisType().getName() + "." + fieldName + "]:The field 'name' in JoinColumn is empty");
        }
        Field left = thisMeta.getField(j.name());
        Assert.notNull(left,"Invalid reference [" + thisMeta.getThisType().getName() + "." + fieldName + "]: field [" + j.name() + "] not found from entity " + thisMeta.getThisType().getName());
        Field right = target.getField(j.referencedColumnName());
        if (right == null) {
            throw new noresultException("Invalid reference [" + thisMeta.getThisType().getName() + "." + fieldName + "]: '" + j.referencedColumnName() + "' is not available in " + target.getThisType().getName());
        }
        result.add(new JoinKey(left,right));
    }
    JoinType type = JoinType.LEFT;
    JoinDescription joinDesc = field.getAnnotation(JoinDescription.class);
    if (joinDesc != null) {
        type = joinDesc.type();
    }
    if (result.size() > 0) {
        JoinPath path = new JoinPath(type,result.toArray(new JoinKey[result.size()]));
        path.setDescription(joinDesc,field.getAnnotation(OrderBy.class));
        if (joinDesc != null && joinDesc.filterCondition().length() > 0) {
            JoinKey joinExpress = getJoinExpress(thisMeta,target,joinDesc.filterCondition().trim());
            if (joinExpress != null)
                path.addJoinKey(joinExpress);
        }
        return path;
    }
    return null;
}
项目:@H_404_2@ef-orm    文件:@H_404_2@MetaHolder.java   
private static JoinPath processJoin(ITableMetadata Meta,AnnotationProvider annos,String mappedBy) {
    JoinDescription joinDesc = annos.getAnnotation(JoinDescription.class);
    OrderBy orderBy = annos.getAnnotation(OrderBy.class);

    List<JoinKey> result = new ArrayList<JoinKey>();

    if (Meta.getPKFields().size() != 1) {
        throw new IllegalArgumentException(Meta.getSimpleName() + " cann't map to " + target.getSimpleName() + " since its primary key field count " + Meta.getPKFields().size());
    }
    Field left = Meta.getPKFields().get(0).field();
    Field right = target.getField(mappedBy);
    if (right == null) {
        throw new IllegalArgumentException(Meta.getSimpleName() + " cann't map to " + target.getSimpleName() + " since there is no field [" + mappedBy + "] in target entity");
    }
    result.add(new JoinKey(left,right));
    JoinType type = JoinType.LEFT;
    if (joinDesc != null) {
        type = joinDesc.type();
    }
    if (result.size() > 0) {
        JoinPath path = new JoinPath(type,orderBy);
        if (joinDesc != null && joinDesc.filterCondition().length() > 0) {
            JoinKey joinExpress = getJoinExpress(Meta,joinDesc.filterCondition().trim());
            if (joinExpress != null)
                path.addJoinKey(joinExpress);
        }
        return path;
    }
    return null;
}
项目:@H_404_2@juddi    文件:@H_404_2@BusinessEntity.java   
@OnetoMany(cascade = CascadeType.ALL,mappedBy = "businessEntity")
@OrderBy
public List<Contact> getContacts() {
               if (this.contacts==null)
                       this.contacts = new ArrayList<Contact>();
    return this.contacts;
}
项目:@H_404_2@SelfSoftShop    文件:@H_404[email protected]   
@ManyToMany(fetch = FetchType.LAZY)
@JoinColumn(nullable = false)
@OrderBy("name asc")
@ForeignKey(name = "fk_admin_role_set")
public Set<Role> getRoleSet() {
    return roleSet;
}
项目:@H_404_2@gesplan    文件:@H_404[email protected]   
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "TECIDO_ID",nullable = false)
// name define o nome da chave estrangeira na tabela
@OrderBy("codTecido")
public Tecido getTecido() {
    return tecido;
}
项目:@H_404_2@gesplan    文件:@H_404[email protected]   
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name = "MODELO_ID",nullable = false)
// name define o nome da chave estrangeira na tabela
@OrderBy("codModelo")
public Modelo getModelo() {
    return modelo;
}
项目:@H_404_2@gesplan    文件:@H_404[email protected]   
@ManyToOne
/** n�o estou usando lazy pois quero os dados do perioPM sempre que mostrar
 capacRec */
@JoinColumn(name = "PERIOPM_ID",nullable = false)
// name define o nome da chave estrangeira na tabela 
@OrderBy("periodoPM")
public PerioPM getPerioPM() {
    return perioPM;
}
项目:@H_404_2@saos    文件:@H_404[email protected]   
@ElementCollection
@CollectionTable(name="judgment_court_reporter",uniqueConstraints={@UniqueConstraint(name="judgment_court_reporter_unique",columnNames={"fk_judgment","court_reporter"})})
@Column(name="court_reporter")
@OrderBy("court_reporter")
private List<String> getCourtReporters_() {
    return courtReporters;
}

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。