@Override public void initialize(Generated annotation, Class<?> propertyType) { this.timing = annotation.value().getEquivalent(); }
public void setWhere(Where whereAnn) { if ( whereAnn != null ) { where = whereAnn.clause(); } }
public void setBatchSize(BatchSize sizeAnn) { if ( sizeAnn != null ) { batchSize = sizeAnn.size(); } else { batchSize = -1; } }
@OptimisticLock(excluded=true) @Type(type = "text") public String getLongDescription() { return longDescription; }
@OneToMany(cascade=CascadeType.ALL, mappedBy = "oldPerson") @LazyCollection(LazyCollectionOption.EXTRA) @Fetch(FetchMode.SUBSELECT) public Collection<Stay> getOldStays() { return oldStays; }
@Any( metaColumn = @Column( name = "property_type" ) ) @Cascade( value = { CascadeType.ALL } ) @AnyMetaDef( idType = "integer", metaType = "string", metaValues = { @MetaValue( value = "S", targetEntity = StringProperty.class ), @MetaValue( value = "I", targetEntity = IntegerProperty.class ) } ) @JoinColumn( name = "property_id" ) public Property getSomeProperty() { return someProperty; }
@ManyToMany(cascade = CascadeType.PERSIST) @OrderBy("expirationDate") @Where(clause = "1=1") @WhereJoinTable(clause = "2=2") @Filter(name="Groupfilter", condition = "3=3") @FilterJoinTable(name="Groupfilter", condition = "4=4") public Collection<Permission> getPermissions() { return permissions; }
@ManyToAny( metaColumn = @Column( name = "property_type" ) ) @AnyMetaDef( idType = "integer", metaType = "string", metaValues = { @MetaValue( value = "S", targetEntity = StringProperty.class ), @MetaValue( value = "I", targetEntity = IntegerProperty.class ) } ) @Cascade( { org.hibernate.annotations.CascadeType.ALL } ) @JoinTable( name = "obj_properties", joinColumns = @JoinColumn( name = "obj_id" ), inverseJoinColumns = @JoinColumn( name = "property_id" ) ) public List<Property> getGeneralProperties() { return generalProperties; }
public void setExplicitType(Type typeAnn) { if ( typeAnn != null ) { explicitType = typeAnn.type(); typeParameters.clear(); for ( Parameter param : typeAnn.parameters() ) { typeParameters.setProperty( param.name(), param.value() ); } } }
@Override public void initialize(GeneratorType annotation, Class<?> propertyType) { Class<? extends ValueGenerator<?>> generatorType = annotation.type(); constructor = ReflectHelper.getDefaultConstructor( generatorType ); this.generationTiming = annotation.when().getEquivalent(); }
@AccessType( "field" ) public long getFloors() { return this.floors + 2; }
@ManyToOne @JoinColumnOrFormula(formula=@JoinFormula(value="UPPER(lang_code)")) //@JoinColumnOrFormula(formula=@JoinFormula(value="(select l.code from Language l where l.name = lang_name)")) public Language getLanguage() { return language; } public void setLanguage(Language language) {
@ColumnTransformer( read = "radiusS / 2.54E0", write = "? * 2.54E0" ) public double getRadiusS() { return radiusS; } public void setRadiusS(double radiusS) { this.radiusS = radiusS; }
@AttributeAccessor( "org.hibernate.test.annotations.access.AttributeAccessorTest$BasicAttributeAccessor" ) public String getName() { return name; }
@OptimisticLock(excluded=true) @Type(type = "text") public String getLongDescription() { return longDescription; }
@OneToMany(targetEntity = ChildEntity.class, mappedBy = "parent") @LazyCollection(LazyCollectionOption.EXTRA) @Fetch(FetchMode.SELECT) public Set<ChildEntity> getChildren() { return children; }
@Any( metaColumn = @Column( name = "property_type" ), fetch = FetchType.LAZY ) @Cascade( value = { CascadeType.ALL } ) @AnyMetaDef( idType = "integer", metaType = "string", metaValues = { @MetaValue( value = "S", targetEntity = StringProperty.class ), @MetaValue( value = "I", targetEntity = IntegerProperty.class ) } ) @JoinColumn( name = "property_id" ) public Property getSomeProperty() { return someProperty; }
@ManyToMany(cascade = CascadeType.PERSIST) @OrderBy("expirationDate") @Where(clause = "1=1") @WhereJoinTable(clause = "2=2") @Filter(name="Groupfilter", condition = "3=3") @FilterJoinTable(name="Groupfilter", condition = "4=4") public Set<Permission> getPermissions() { return permissions; }