Package org.hibernate.annotations

Examples of org.hibernate.annotations.NaturalId


    // Natural ID columns must reside in one single UniqueKey within the Table.
    // For now, simply ensure consistent naming.
    // TODO: AFAIK, there really isn't a reason for these UKs to be created
    // on the secondPass.  This whole area should go away...
    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for ( Ejb3Column column : joinColumns ) {
          String keyName = "UK_" + Constraint.hashedName( column.getTable().getName() + "_NaturalID" );
          column.addUniqueKey( keyName, inSecondPass );
View Full Code Here


          }
        }
      }
    }

    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for (Ejb3Column column : joinColumns) {
          column.addUniqueKey( "_UniqueKey", inSecondPass );
        }
View Full Code Here

          updatable = false;
        }
        prop.setGeneration( PropertyGeneration.parse( generated.toString().toLowerCase() ) );
      }
    }
    NaturalId naturalId = property != null ?
        property.getAnnotation( NaturalId.class ) :
        null;
    if ( naturalId != null ) {
      if ( !naturalId.mutable() ) {
        updatable = false;
      }
      prop.setNaturalIdentifier( true );
    }
    prop.setInsertable( insertable );
View Full Code Here

    if ( property != null ) {
      prop.setValueGenerationStrategy( determineValueGenerationStrategy( property ) );
    }

    NaturalId naturalId = property != null ? property.getAnnotation( NaturalId.class ) : null;
    if ( naturalId != null ) {
      if ( ! entityBinder.isRootEntity() ) {
        throw new AnnotationException( "@NaturalId only valid on root entity (or its @MappedSuperclasses)" );
      }
      if ( ! naturalId.mutable() ) {
        updatable = false;
      }
      prop.setNaturalIdentifier( true );
    }
View Full Code Here

          }
        }
      }
    }

    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for ( Ejb3Column column : joinColumns ) {
          column.addUniqueKey( "_UniqueKey", inSecondPass );
        }
View Full Code Here

          updatable = false;
        }
        prop.setGeneration( PropertyGeneration.parse( generated.toString().toLowerCase() ) );
      }
    }
    NaturalId naturalId = property != null ?
        property.getAnnotation( NaturalId.class ) :
        null;
    if ( naturalId != null ) {
      if ( !naturalId.mutable() ) {
        updatable = false;
      }
      prop.setNaturalIdentifier( true );
    }
    prop.setInsertable( insertable );
View Full Code Here

          updatable = false;
        }
        prop.setGeneration( PropertyGeneration.parse( generated.toString().toLowerCase() ) );
      }
    }
    NaturalId naturalId = property != null ?
        property.getAnnotation( NaturalId.class ) :
        null;
    if ( naturalId != null ) {
      if ( !naturalId.mutable() ) {
        updatable = false;
      }
      prop.setNaturalIdentifier( true );
    }
    prop.setInsertable( insertable );
View Full Code Here

          }
        }
      }
    }

    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for (Ejb3Column column : joinColumns) {
          column.addUniqueKey( "_UniqueKey", inSecondPass );
        }
View Full Code Here

          }
        }
      }
    }

    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for ( Ejb3Column column : joinColumns ) {
          column.addUniqueKey( "_UniqueKey", inSecondPass );
        }
View Full Code Here

          }
        }
      }
    }

    NaturalId naturalIdAnn = property.getAnnotation( NaturalId.class );
    if ( naturalIdAnn != null ) {
      if ( joinColumns != null ) {
        for ( Ejb3Column column : joinColumns ) {
          column.addUniqueKey( "_UniqueKey", inSecondPass );
        }
View Full Code Here

TOP

Related Classes of org.hibernate.annotations.NaturalId

Copyright © 2018 www.massapicom. 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.