Package org.hibernate.metamodel.relational

Examples of org.hibernate.metamodel.relational.DerivedValue


      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here


      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
        DerivedValue formula = ( DerivedValue ) discriminatorRelationalValue;
        discriminatorFormula = formula.getExpression();
        discriminatorFormulaTemplate = getTemplateFromString( formula.getExpression(), factory );
        discriminatorColumnName = null;
        discriminatorColumnReaders = null;
        discriminatorColumnReaderTemplate = null;
        discriminatorAlias = "clazz_";
      }
View Full Code Here

      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here

      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
        DerivedValue formula = ( DerivedValue ) discriminatorRelationalValue;
        discriminatorFormula = formula.getExpression();
        discriminatorFormulaTemplate = getTemplateFromString( formula.getExpression(), factory );
        discriminatorColumnName = null;
        discriminatorColumnReaders = null;
        discriminatorColumnReaderTemplate = null;
        discriminatorAlias = "clazz_";
      }
View Full Code Here

      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here

      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here

      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
        DerivedValue formula = ( DerivedValue ) discriminatorRelationalValue;
        discriminatorFormula = formula.getExpression();
        discriminatorFormulaTemplate = getTemplateFromString( formula.getExpression(), factory );
        discriminatorColumnName = null;
        discriminatorColumnReaders = null;
        discriminatorColumnReaderTemplate = null;
        discriminatorAlias = "clazz_";
      }
View Full Code Here

      if ( discriminatorRelationalValue == null ) {
        throw new MappingException("discriminator mapping required for single table polymorphic persistence");
      }
      forceDiscriminator = entityBinding.getHierarchyDetails().getEntityDiscriminator().isForced();
      if ( DerivedValue.class.isInstance( discriminatorRelationalValue ) ) {
        DerivedValue formula = ( DerivedValue ) discriminatorRelationalValue;
        discriminatorFormula = formula.getExpression();
        discriminatorFormulaTemplate = getTemplateFromString( formula.getExpression(), factory );
        discriminatorColumnName = null;
        discriminatorColumnReaders = null;
        discriminatorColumnReaderTemplate = null;
        discriminatorAlias = "clazz_";
      }
View Full Code Here

      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here

      int[] formnos = new int[ span ];
      int l = 0;
      Boolean lazy = singularAttributeBinding.isLazy() && lazyAvailable;
      for ( SimpleValueBinding valueBinding : singularAttributeBinding.getSimpleValueBindings() ) {
        if ( valueBinding.isDerived() ) {
          DerivedValue derivedValue = DerivedValue.class.cast( valueBinding.getSimpleValue() );
          String template = getTemplateFromString( derivedValue.getExpression(), factory );
          formnos[l] = formulaTemplates.size();
          colnos[l] = -1;
          formulaTemplates.add( template );
          forms[l] = template;
          formulas.add( derivedValue.getExpression() );
          formulaAliases.add( derivedValue.getAlias( factory.getDialect() ) );
          formulasLazy.add( lazy );
        }
        else {
          org.hibernate.metamodel.relational.Column col = org.hibernate.metamodel.relational.Column.class.cast( valueBinding.getSimpleValue() );
          String colName = col.getColumnName().encloseInQuotesIfQuoted( factory.getDialect() );
View Full Code Here

TOP

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

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.