Package org.hibernate.mapping

Examples of org.hibernate.mapping.PropertyGeneration


    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here


    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

    Attribute lockNode = node.attribute( "optimistic-lock" );
    property.setOptimisticLocked( lockNode == null || "true".equals( lockNode.getValue() ) );

    Attribute generatedNode = node.attribute( "generated" );
        String generationName = generatedNode == null ? null : generatedNode.getValue();
        PropertyGeneration generation = PropertyGeneration.parse( generationName );
    property.setGeneration( generation );

        if ( generation == PropertyGeneration.ALWAYS || generation == PropertyGeneration.INSERT ) {
          // generated properties can *never* be insertable...
          if ( property.isInsertable() ) {
            if ( insertNode == null ) {
              // insertable simply because that is the user did not specify
              // anything; just override it
          property.setInsertable( false );
            }
            else {
              // the user specifically supplied insert="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both insert=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }

          // properties generated on update can never be updateable...
          if ( property.isUpdateable() && generation == PropertyGeneration.ALWAYS ) {
            if ( updateNode == null ) {
              // updateable only because the user did not specify
              // anything; just override it
              property.setUpdateable( false );
            }
            else {
              // the user specifically supplied update="true",
              // which constitutes an illegal combo
          throw new MappingException(
              "cannot specify both update=\"true\" and generated=\"" + generation.getName() +
              "\" for property: " +
              propName
          );
            }
          }
View Full Code Here

TOP

Related Classes of org.hibernate.mapping.PropertyGeneration

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.