Examples of table()


Examples of info.archinnov.achilles.annotations.Entity.table()

    }

    public String inferTableName(Class<?> entityClass, String canonicalName, NamingStrategy namingStrategy) {
        Entity annotation = entityClass.getAnnotation(Entity.class);
        String tableName;
        if (isNotBlank(annotation.table())) {
            tableName = validateSchemaName(applyNamingStrategy(annotation.table(), namingStrategy));
        } else {
            tableName = validateSchemaName(applyNamingStrategy(extractTableNameFromCanonical(canonicalName), namingStrategy));
        }
        log.debug("Inferred tableName for entity {} : {}", canonicalName, tableName);
View Full Code Here

Examples of javax.jdo.annotations.PersistenceCapable.table()

        final Class<?> cls = processClassContext.getCls();
        final PersistenceCapable annotation = Annotations.getAnnotation(cls, PersistenceCapable.class);
        if (annotation == null) {
            return;
        }
        String annotationTableAttribute = annotation.table();
        if (Strings.isNullOrEmpty(annotationTableAttribute)) {
            annotationTableAttribute = cls.getSimpleName();
        }

        final IdentityType annotationIdentityType = annotation.identityType();
View Full Code Here

Examples of javax.persistence.Column.table()

       
        Column column = f.getAnnotation(Column.class);
        String name = column != null ? column.name() : field;
       
        StringBuilder order = new StringBuilder();
        if (column.table() == null || column.table().length() == 0) {
            order.append(DbUtil.getTableName(clazz));
        } else {
            order.append(column.table());
        }
        order.append(".").append(name).append(ascending ? " ASC " : " DESC ");
View Full Code Here

Examples of javax.persistence.MapKeyColumn.table()

    assertAnnotationNotPresent( MapKeyJoinColumns.class );
    assertAnnotationNotPresent( MapKeyJoinColumn.class );
    MapKeyColumn keyColAnno = reader.getAnnotation( MapKeyColumn.class );
    assertEquals( "", keyColAnno.columnDefinition() );
    assertEquals( "", keyColAnno.name() );
    assertEquals( "", keyColAnno.table() );
    assertFalse( keyColAnno.nullable() );
    assertTrue( keyColAnno.insertable() );
    assertFalse( keyColAnno.unique() );
    assertTrue( keyColAnno.updatable() );
    assertEquals( 255, keyColAnno.length() );
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

      TableGenerator tableAnn = getJavaAnnotation( TableGenerator.class );
      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          || StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
        AnnotationDescriptor annotation = new AnnotationDescriptor( TableGenerator.class );
        annotation.setValue( "name", tableAnn.name() );
        annotation.setValue( "table", tableAnn.table() );
        annotation.setValue( "catalog", tableAnn.table() );
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) )
            && StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
          annotation.setValue( "catalog", defaults.getCatalog() );
        }
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

      if ( StringHelper.isNotEmpty( defaults.getSchema() )
          || StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
        AnnotationDescriptor annotation = new AnnotationDescriptor( TableGenerator.class );
        annotation.setValue( "name", tableAnn.name() );
        annotation.setValue( "table", tableAnn.table() );
        annotation.setValue( "catalog", tableAnn.table() );
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) )
            && StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
          annotation.setValue( "catalog", defaults.getCatalog() );
        }
        annotation.setValue( "schema", tableAnn.table() );
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

        annotation.setValue( "catalog", tableAnn.table() );
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "catalog" ) )
            && StringHelper.isNotEmpty( defaults.getCatalog() ) ) {
          annotation.setValue( "catalog", defaults.getCatalog() );
        }
        annotation.setValue( "schema", tableAnn.table() );
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) )
            && StringHelper.isNotEmpty( defaults.getSchema() ) ) {
          annotation.setValue( "catalog", defaults.getSchema() );
        }
        annotation.setValue( "pkColumnName", tableAnn.pkColumnName() );
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

          idGen.addParam( PersistentIdentifierGenerator.CATALOG, tabGen.catalog() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.schema() ) ) {
          idGen.addParam( PersistentIdentifierGenerator.SCHEMA, tabGen.schema() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.table() ) ) {
          idGen.addParam( org.hibernate.id.enhanced.TableGenerator.TABLE_PARAM, tabGen.table() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.pkColumnName() ) ) {
          idGen.addParam(
              org.hibernate.id.enhanced.TableGenerator.SEGMENT_COLUMN_PARAM, tabGen.pkColumnName()
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.schema() ) ) {
          idGen.addParam( PersistentIdentifierGenerator.SCHEMA, tabGen.schema() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.table() ) ) {
          idGen.addParam( org.hibernate.id.enhanced.TableGenerator.TABLE_PARAM, tabGen.table() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.pkColumnName() ) ) {
          idGen.addParam(
              org.hibernate.id.enhanced.TableGenerator.SEGMENT_COLUMN_PARAM, tabGen.pkColumnName()
          );
View Full Code Here

Examples of javax.persistence.TableGenerator.table()

                if (tabGen.uniqueConstraints() != null && tabGen.uniqueConstraints().length > 0) LOG.warn(tabGen.name());
      }
      else {
        idGen.setIdentifierGeneratorStrategy( MultipleHiLoPerTableGenerator.class.getName() );

        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.table() ) ) {
          idGen.addParam( MultipleHiLoPerTableGenerator.ID_TABLE, tabGen.table() );
        }
        if ( !BinderHelper.isEmptyAnnotationValue( tabGen.catalog() ) ) {
          idGen.addParam( PersistentIdentifierGenerator.CATALOG, tabGen.catalog() );
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.