Tabnine Logo
org.hibernate.annotations
Code IndexAdd Tabnine to your IDE (free)

How to use org.hibernate.annotations

Best Java code snippets using org.hibernate.annotations (Showing top 20 results out of 1,278)

origin: hibernate/hibernate-orm

@Override
public void initialize(Generated annotation, Class<?> propertyType) {
  this.timing = annotation.value().getEquivalent();
}
origin: hibernate/hibernate-orm

public void setWhere(Where whereAnn) {
  if ( whereAnn != null ) {
    where = whereAnn.clause();
  }
}
origin: hibernate/hibernate-orm

public void setBatchSize(BatchSize sizeAnn) {
  if ( sizeAnn != null ) {
    batchSize = sizeAnn.size();
  }
  else {
    batchSize = -1;
  }
}
origin: hibernate/hibernate-orm

@Type(type = "caster", parameters = {@Parameter(name = "cast", value = "upper")})
public String getBigText() {
  return bigText;
}
origin: hibernate/hibernate-orm

@OptimisticLock(excluded=true) 
@Type(type = "text")
public String getLongDescription() {
  return longDescription;
}
origin: hibernate/hibernate-orm

@OneToMany(cascade=CascadeType.ALL, mappedBy = "oldPerson")
@LazyCollection(LazyCollectionOption.EXTRA)
@Fetch(FetchMode.SUBSELECT)
public Collection<Stay> getOldStays() {
  return oldStays;
}
origin: hibernate/hibernate-orm

@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;
}
origin: hibernate/hibernate-orm

@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;
}
origin: hibernate/hibernate-orm

@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;
}
origin: hibernate/hibernate-orm

@OneToMany(targetEntity = Player.class, mappedBy = "team", fetch = FetchType.EAGER)
@Fetch(FetchMode.SELECT)
@Loader(namedQuery = "loadByTeam")
public Set<Player> getPlayers() {
  return players;
}
origin: hibernate/hibernate-orm

public void setExplicitType(Type typeAnn) {
  if ( typeAnn != null ) {
    explicitType = typeAnn.type();
    typeParameters.clear();
    for ( Parameter param : typeAnn.parameters() ) {
      typeParameters.setProperty( param.name(), param.value() );
    }
  }
}
origin: hibernate/hibernate-orm

@Override
public void initialize(GeneratorType annotation, Class<?> propertyType) {
  Class<? extends ValueGenerator<?>> generatorType = annotation.type();
  constructor = ReflectHelper.getDefaultConstructor( generatorType );
  this.generationTiming = annotation.when().getEquivalent();
}
origin: hibernate/hibernate-orm

@AccessType( "field" )
public long getFloors() {
  return this.floors + 2;
}
origin: hibernate/hibernate-orm

@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) {
origin: hibernate/hibernate-orm

@ColumnTransformer(
    read = "radiusS / 2.54E0",
    write = "? * 2.54E0" )
public double getRadiusS() { return radiusS; }
public void setRadiusS(double radiusS) {  this.radiusS = radiusS; }
origin: hibernate/hibernate-orm

@AttributeAccessor( "org.hibernate.test.annotations.access.AttributeAccessorTest$BasicAttributeAccessor" )
public String getName() {
  return name;
}
origin: hibernate/hibernate-orm

@OptimisticLock(excluded=true)
@Type(type = "text")
public String getLongDescription() {
  return longDescription;
}
origin: hibernate/hibernate-orm

@OneToMany(targetEntity = ChildEntity.class, mappedBy = "parent")
@LazyCollection(LazyCollectionOption.EXTRA)
@Fetch(FetchMode.SELECT)
public Set<ChildEntity> getChildren() {
  return children;
}
origin: hibernate/hibernate-orm

@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;
}
origin: hibernate/hibernate-orm

@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;
}
org.hibernate.annotations

Most used classes

  • Type
  • GenericGenerator
  • Cache
  • Index
  • Parameter
  • Cascade,
  • NaturalId,
  • BatchSize,
  • Where,
  • LazyCollection,
  • Immutable,
  • Table,
  • IndexColumn,
  • TypeDef,
  • CreationTimestamp,
  • DynamicUpdate,
  • OnDelete,
  • Filter,
  • ForeignKey
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now