Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.SimpleValue


    hasSequentialSelects = hasDeferred;

    // DISCRIMINATOR

    if ( entityBinding.isPolymorphic() ) {
      SimpleValue discriminatorRelationalValue = entityBinding.getHierarchyDetails().getEntityDiscriminator().getBoundValue();
      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
View Full Code Here


    if ( discriminatorSource == null ) {
      return;
    }

    EntityDiscriminator discriminator = new EntityDiscriminator();
    SimpleValue relationalValue = makeSimpleValue(
        entityBinding,
        discriminatorSource.getDiscriminatorRelationalValueSource()
    );
    discriminator.setBoundValue( relationalValue );
View Full Code Here

    }

     // todo : this can be made a lot smarter, but for now this will suffice.  currently we only handle single value bindings

     if ( SimpleValue.class.isInstance( value ) ) {
       SimpleValue simpleValue = ( SimpleValue ) value;
       if ( simpleValue.getDatatype() == null ) {
         simpleValue.setDatatype(
             new Datatype(
                 resolvedHibernateType.sqlTypes( metadata )[0],
                 resolvedHibernateType.getName(),
                 resolvedHibernateType.getReturnedClass()
             )
View Full Code Here

    hasSequentialSelects = hasDeferred;

    // DISCRIMINATOR

    if ( entityBinding.isPolymorphic() ) {
      SimpleValue discriminatorRelationalValue = entityBinding.getHierarchyDetails().getEntityDiscriminator().getBoundValue();
      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
View Full Code Here

    }

     // todo : this can be made a lot smarter, but for now this will suffice.  currently we only handle single value bindings

     if ( SimpleValue.class.isInstance( value ) ) {
       SimpleValue simpleValue = ( SimpleValue ) value;
       if ( simpleValue.getDatatype() == null ) {
         simpleValue.setDatatype(
             new Datatype(
                 resolvedHibernateType.sqlTypes( metadata )[0],
                 resolvedHibernateType.getName(),
                 resolvedHibernateType.getReturnedClass()
             )
View Full Code Here

    hasSequentialSelects = hasDeferred;

    // DISCRIMINATOR

    if ( entityBinding.isPolymorphic() ) {
      SimpleValue discriminatorRelationalValue = entityBinding.getHierarchyDetails().getEntityDiscriminator().getBoundValue();
      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
View Full Code Here

    if ( getSimpleValueSpan() > 1 ) {
      throw new MappingException(
          "A SimpleAttributeBinding used for an identifier has more than 1 Value: " + getAttribute().getName()
      );
    }
    SimpleValue simpleValue = (SimpleValue) getValue();
    if ( !Column.class.isInstance( simpleValue ) ) {
      throw new MappingException(
          "Cannot create an IdentifierGenerator because the value is not a column: " +
              simpleValue.toLoggableString()
      );
    }
    params.setProperty(
        PersistentIdentifierGenerator.PK,
        ( (Column) simpleValue ).getColumnName().encloseInQuotesIfQuoted(
View Full Code Here

    hasSequentialSelects = hasDeferred;

    // DISCRIMINATOR

    if ( entityBinding.isPolymorphic() ) {
      SimpleValue discriminatorRelationalValue = entityBinding.getHierarchyDetails().getEntityDiscriminator().getBoundValue();
      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
View Full Code Here

    //polymorphic = ! entityBinding.isRoot() || entityBinding.hasSubclasses();
    boolean isPolymorphic = ! entityBinding.isRoot() || hasSubclasses;
    final Object discriminatorValue;
    if ( isPolymorphic ) {
      SimpleValue discriminatorRelationalValue = entityBinding.getHierarchyDetails().getEntityDiscriminator().getBoundValue();
      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
View Full Code Here

    }

     // todo : this can be made a lot smarter, but for now this will suffice.  currently we only handle single value bindings

     if ( SimpleValue.class.isInstance( value ) ) {
       SimpleValue simpleValue = ( SimpleValue ) value;
       if ( simpleValue.getDatatype() == null ) {
         simpleValue.setDatatype(
             new Datatype(
                 resolvedHibernateType.sqlTypes( metadata )[0],
                 resolvedHibernateType.getName(),
                 resolvedHibernateType.getReturnedClass()
             )
View Full Code Here

TOP

Related Classes of org.hibernate.metamodel.relational.SimpleValue

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.