Package javax.persistence

Examples of javax.persistence.Table.schema()


      Table t = beanDescriptor.getAnnotation(Table.class);
      if (t != null) {
        XmlElement table = entity.addElement("table");
        table.setAttribute("name", t.name());
        if (ConditionUtils.isNotEmpty(t.schema())) {
          table.setAttribute("schema", t.schema());
        }
      }

      XmlElement attributes = entity.addElement("attributes");
View Full Code Here


        AnnotationDescriptor annotation = new AnnotationDescriptor( Table.class );
        if ( defaults.canUseJavaAnnotations() ) {
          Table table = getJavaAnnotation( Table.class );
          if ( table != null ) {
            annotation.setValue( "name", table.name() );
            annotation.setValue( "schema", table.schema() );
            annotation.setValue( "catalog", table.catalog() );
            annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );
            annotation.setValue( "indexes", table.indexes() );
          }
        }
View Full Code Here

        AnnotationDescriptor annotation = new AnnotationDescriptor( Table.class );
        if ( defaults.canUseJavaAnnotations() ) {
          Table table = getJavaAnnotation( Table.class );
          if ( table != null ) {
            annotation.setValue( "name", table.name() );
            annotation.setValue( "schema", table.schema() );
            annotation.setValue( "catalog", table.catalog() );
            annotation.setValue( "uniqueConstraints", table.uniqueConstraints() );
          }
        }
        if ( StringHelper.isEmpty( (String) annotation.valueOf( "schema" ) )
View Full Code Here

        Table table = clazz.getAnnotation(Table.class);
        // Still we need to validate for this after post metadata
        // population.
        if (table != null)
        {
            String schemaName = table.schema();
            if (schemaName != null && schemaName.indexOf('@') > 0)
            {
                schemaName = schemaName.substring(0, schemaName.indexOf('@'));
                GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class);
                if (generatedValue != null && generatedValue.generator() != null
View Full Code Here

    {
        Table table = clazz.getAnnotation(Table.class);
        // Still we need to validate for this after post metadata population.
        if (table != null)
        {
            String schemaName = table.schema();
            if (schemaName != null && schemaName.indexOf('@') > 0)
            {
                schemaName = schemaName.substring(0, schemaName.indexOf('@'));
                GeneratedValue generatedValue = field.getAnnotation(GeneratedValue.class);
                if (generatedValue != null && generatedValue.generator() != null
View Full Code Here

            metadata.setTableName(!StringUtils.isBlank(table.name()) ?
                     table.name() : clazz.getSimpleName());
            // Add named/native query related application metadata.
            addNamedNativeQueryMetadata(clazz);
            // set schema name and persistence unit name (if provided)
            String schemaStr = table.schema();

            MetadataUtils.setSchemaAndPersistenceUnit(metadata, schemaStr, puProperties);
        }
        if (metadata.getPersistenceUnit() == null)
        {
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.