Tabnine Logo
AnnotationBinder.isDefault
Code IndexAdd Tabnine to your IDE (free)

How to use
isDefault
method
in
org.hibernate.cfg.AnnotationBinder

Best Java code snippets using org.hibernate.cfg.AnnotationBinder.isDefault (Showing top 20 results out of 315)

origin: hibernate/hibernate-orm

public static String getReferenceEntityName(PropertyData propertyData, XClass targetEntity, MetadataBuildingContext buildingContext) {
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: hibernate/hibernate-orm

private XClass getCollectionType() {
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    if ( collectionType != null ) {
      return collectionType;
    }
    else {
      String errorMsg = "Collection has neither generic type or OneToMany.targetEntity() defined: "
          + safeCollectionRole();
      throw new AnnotationException( errorMsg );
    }
  }
  else {
    return targetEntity;
  }
}
origin: hibernate/hibernate-orm

public static String getReferenceEntityName(PropertyData propertyData, MetadataBuildingContext buildingContext) {
  XClass targetEntity = getTargetEntity( propertyData, buildingContext );
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: hibernate/hibernate-orm

@SuppressWarnings({ "unchecked" })
public void setProxy(Proxy proxy) {
  if ( proxy != null ) {
    lazy = proxy.lazy();
    if ( !lazy ) {
      proxyClass = null;
    }
    else {
      final ReflectionManager reflectionManager = context.getBootstrapContext().getReflectionManager();
      if ( AnnotationBinder.isDefault( reflectionManager.toXClass( proxy.proxyClass() ), context ) ) {
        proxyClass = annotatedClass;
      }
      else {
        proxyClass = reflectionManager.toXClass( proxy.proxyClass() );
      }
    }
  }
  else {
    lazy = true; //needed to allow association lazy loading.
    proxyClass = annotatedClass;
  }
}
origin: org.hibernate/hibernate-annotations

public static String getReferenceEntityName(PropertyData propertyData, XClass targetEntity, ExtendedMappings mappings) {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/hibernate-annotations

private XClass getCollectionType() {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    if ( collectionType != null ) {
      return collectionType;
    }
    else {
      String errorMsg = "Collection has neither generic type or OneToMany.targetEntity() defined: "
          + safeCollectionRole();
      throw new AnnotationException( errorMsg );
    }
  }
  else {
    return targetEntity;
  }
}
origin: org.hibernate/hibernate-annotations

public static String getReferenceEntityName(PropertyData propertyData, ExtendedMappings mappings) {
  XClass targetEntity = getTargetEntity( propertyData, mappings );
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/hibernate-annotations

@SuppressWarnings({ "unchecked" })
public void setProxy(Proxy proxy) {
  if ( proxy != null ) {
    lazy = proxy.lazy();
    if ( !lazy ) {
      proxyClass = null;
    }
    else {
      if ( AnnotationBinder.isDefault(
          mappings.getReflectionManager().toXClass( proxy.proxyClass() ), mappings
      ) ) {
        proxyClass = annotatedClass;
      }
      else {
        proxyClass = mappings.getReflectionManager().toXClass( proxy.proxyClass() );
      }
    }
  }
  else {
    lazy = true; //needed to allow association lazy loading.
    proxyClass = annotatedClass;
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public static String getReferenceEntityName(PropertyData propertyData, XClass targetEntity, Mappings mappings) {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public static String getReferenceEntityName(PropertyData propertyData, XClass targetEntity, Mappings mappings) {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate.orm/hibernate-core

public static String getReferenceEntityName(PropertyData propertyData, XClass targetEntity, MetadataBuildingContext buildingContext) {
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

private XClass getCollectionType() {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    if ( collectionType != null ) {
      return collectionType;
    }
    else {
      String errorMsg = "Collection has neither generic type or OneToMany.targetEntity() defined: "
          + safeCollectionRole();
      throw new AnnotationException( errorMsg );
    }
  }
  else {
    return targetEntity;
  }
}
origin: org.hibernate/com.springsource.org.hibernate

private XClass getCollectionType() {
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    if ( collectionType != null ) {
      return collectionType;
    }
    else {
      String errorMsg = "Collection has neither generic type or OneToMany.targetEntity() defined: "
          + safeCollectionRole();
      throw new AnnotationException( errorMsg );
    }
  }
  else {
    return targetEntity;
  }
}
origin: org.hibernate.orm/hibernate-core

private XClass getCollectionType() {
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    if ( collectionType != null ) {
      return collectionType;
    }
    else {
      String errorMsg = "Collection has neither generic type or OneToMany.targetEntity() defined: "
          + safeCollectionRole();
      throw new AnnotationException( errorMsg );
    }
  }
  else {
    return targetEntity;
  }
}
origin: org.hibernate.orm/hibernate-core

public static String getReferenceEntityName(PropertyData propertyData, MetadataBuildingContext buildingContext) {
  XClass targetEntity = getTargetEntity( propertyData, buildingContext );
  if ( AnnotationBinder.isDefault( targetEntity, buildingContext ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public static String getReferenceEntityName(PropertyData propertyData, Mappings mappings) {
  XClass targetEntity = getTargetEntity( propertyData, mappings );
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public static String getReferenceEntityName(PropertyData propertyData, Mappings mappings) {
  XClass targetEntity = getTargetEntity( propertyData, mappings );
  if ( AnnotationBinder.isDefault( targetEntity, mappings ) ) {
    return propertyData.getClassOrElementName();
  }
  else {
    return targetEntity.getName();
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public static void bindQuery(org.hibernate.annotations.NamedQuery queryAnn, ExtendedMappings mappings) {
  if ( queryAnn == null ) return;
  if ( BinderHelper.isDefault( queryAnn.name() ) ) {
    throw new AnnotationException( "A named query must have a name when used in class or package level" );
  }
  FlushMode flushMode;
  flushMode = getFlushMode( queryAnn.flushMode() );
  NamedQueryDefinition query = new NamedQueryDefinition(
      queryAnn.query(),
      queryAnn.cacheable(),
      BinderHelper.isDefault( queryAnn.cacheRegion() ) ? null : queryAnn.cacheRegion(),
      queryAnn.timeout() < 0 ? null : queryAnn.timeout(),
      queryAnn.fetchSize() < 0 ? null : queryAnn.fetchSize(),
      flushMode,
      getCacheMode( queryAnn.cacheMode() ),
      queryAnn.readOnly(),
      BinderHelper.isDefault( queryAnn.comment() ) ? null : queryAnn.comment(),
      null
  );
  mappings.addQuery( queryAnn.name(), query );
  if ( log.isInfoEnabled() ) log.info( "Binding named query: " + queryAnn.name() + " => " + queryAnn.query() );
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

  public SimpleValue fillSimpleValue(SimpleValue simpleValue) {
    String type = BinderHelper.isDefault( explicitType ) ? returnedClassName : explicitType;
    org.hibernate.mapping.TypeDef typeDef = mappings.getTypeDef( type );
    if ( typeDef != null ) {
      type = typeDef.getTypeClass();
      simpleValue.setTypeParameters( typeDef.getParameters() );
    }
    if ( typeParameters != null && typeParameters.size() != 0 ) {
      //explicit type params takes precedence over type def params
      simpleValue.setTypeParameters( typeParameters );
    }
    simpleValue.setTypeName( type );
    if ( persistentClassName != null ) {
      simpleValue.setTypeUsingReflection( persistentClassName, propertyName );
    }
    for ( Ejb3Column column : columns ) {
      column.linkWithValue( simpleValue );
    }
    return simpleValue;
  }
}
origin: jboss.jboss-embeddable-ejb3/hibernate-all

public void setJoinAnnotation(JoinColumn annJoin, String defaultName) {
  if ( annJoin == null ) {
    setImplicit( true );
  }
  else {
    setImplicit( false );
    if ( ! BinderHelper.isDefault( annJoin.columnDefinition() ) ) setSqlType( annJoin.columnDefinition() );
    if ( ! BinderHelper.isDefault( annJoin.name() ) ) setLogicalColumnName( annJoin.name() );
    setNullable( annJoin.nullable() );
    setUnique( annJoin.unique() );
    setInsertable( annJoin.insertable() );
    setUpdatable( annJoin.updatable() );
    setReferencedColumn( annJoin.referencedColumnName() );
    setSecondaryTableName( annJoin.table() );
  }
}
org.hibernate.cfgAnnotationBinderisDefault

Popular methods of AnnotationBinder

  • bindClass
    Bind a class having JSR175 annotations The subclasses have to be binded after its mother class
  • bindComponent
  • bindDefaults
  • bindFilterDef
  • bindFilterDefs
  • bindJoinedTableAssociation
  • bindManyToOne
  • bindOneToOne
  • bindPackage
  • bindQueries
  • bindTypeDef
  • bindTypeDefs
  • bindTypeDef,
  • bindTypeDefs,
  • buildIdGenerator,
  • buildInheritanceStates,
  • convertToHibernateCascadeType,
  • defineFetchingStrategy,
  • fillComponent,
  • generatorType,
  • getCascadeStrategy,
  • getFetchMode

Popular in Java

  • Running tasks concurrently on multiple threads
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSystemService (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Top Sublime Text plugins
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