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

Best code snippets using org.hibernate.annotations(Showing top 15 results out of 477)

origin: org.hibernate/hibernate-core

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

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

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

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: org.hibernate/hibernate-core

private static void setVersionInformation(XProperty property, PropertyBinder propertyBinder) {
  propertyBinder.getSimpleValueBinder().setVersion( true );
  if(property.isAnnotationPresent( Source.class )) {
    Source source = property.getAnnotation( Source.class );
    propertyBinder.getSimpleValueBinder().setTimestampVersionType( source.value().typeName() );
  }
}
origin: org.hibernate/hibernate-core

private static void bindFetchProfile(FetchProfile fetchProfileAnnotation, MetadataBuildingContext context) {
  for ( FetchProfile.FetchOverride fetch : fetchProfileAnnotation.fetchOverrides() ) {
    org.hibernate.annotations.FetchMode mode = fetch.mode();
    if ( !mode.equals( org.hibernate.annotations.FetchMode.JOIN ) ) {
      throw new MappingException( "Only FetchMode.JOIN is currently supported" );
    }
    context.getMetadataCollector().addSecondPass(
        new VerifyFetchProfileReferenceSecondPass(
            fetchProfileAnnotation.name(),
            fetch,
            context
        )
    );
  }
}
origin: org.hibernate/hibernate-core

public static void bindNativeQueries(
    org.hibernate.annotations.NamedNativeQueries queriesAnn,
    MetadataBuildingContext context) {
  if ( queriesAnn == null ) {
    return;
  }
  for (org.hibernate.annotations.NamedNativeQuery q : queriesAnn.value()) {
    bindNativeQuery( q, context );
  }
}
origin: org.hibernate/hibernate-core

public void addIndex(Index index, boolean inSecondPass) {
  if ( index == null ) return;
  String indexName = index.name();
  addIndex( indexName, inSecondPass );
}
origin: org.hibernate/hibernate-core

private String getCondition(FilterJoinTable filter) {
  //set filtering
  String name = filter.name();
  String cond = filter.condition();
  return getCondition( cond, name );
}
origin: org.hibernate/hibernate-core

public static void bindQueries(
    org.hibernate.annotations.NamedQueries queriesAnn,
    MetadataBuildingContext context) {
  if ( queriesAnn == null ) {
    return;
  }
  for (org.hibernate.annotations.NamedQuery q : queriesAnn.value()) {
    bindQuery( q, context );
  }
}
origin: org.hibernate/hibernate-core

private String getCondition(Filter filter) {
  //set filtering
  String name = filter.name();
  String cond = filter.condition();
  return getCondition( cond, name );
}
origin: org.hibernate/hibernate-core

public void processComplementaryTableDefinitions(Tables tables) {
  if ( tables == null ) return;
  for (org.hibernate.annotations.Table table : tables.value()) {
    processComplementaryTableDefinitions( table );
  }
}
origin: org.hibernate/hibernate-core

public static String getCacheConcurrencyStrategy(CacheConcurrencyStrategy strategy) {
  org.hibernate.cache.spi.access.AccessType accessType = strategy.toAccessType();
  return accessType == null ? null : accessType.getExternalName();
}
origin: org.hibernate/hibernate-core

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

public void setBatchSize(BatchSize batchSize) {
  this.batchSize = batchSize == null ? -1 : batchSize.size();
}
org.hibernate.annotations

Most used classes

  • Type
  • GenericGenerator
  • Cache
  • Cascade
  • Index
  • Fetch,
  • BatchSize,
  • Table,
  • Formula,
  • Entity,
  • NotFound,
  • Where,
  • LazyCollection,
  • OnDelete,
  • TypeDef,
  • CollectionOfElements,
  • Immutable,
  • IndexColumn,
  • Sort

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)