Package org.hibernate.persister.entity

Examples of org.hibernate.persister.entity.Queryable.toColumns()


    }

    setFromElement(fromElement);
    String property = getText();
    String[] columns = getWalker().isSelectStatement()
        ? persister.toColumns(fromElement.getTableAlias(), property)
        : persister.toColumns(property);
    String text = StringHelper.join(", ", columns);
    setText(columns.length == 1 ? text : "(" + text + ")");
    setType(SqlTokenTypes.SQL_TOKEN);
View Full Code Here


    setFromElement(fromElement);
    String property = getText();
    String[] columns = getWalker().isSelectStatement()
        ? persister.toColumns(fromElement.getTableAlias(), property)
        : persister.toColumns(property);
    String text = StringHelper.join(", ", columns);
    setText(columns.length == 1 ? text : "(" + text + ")");
    setType(SqlTokenTypes.SQL_TOKEN);

    // these pieces are needed for usage in select clause
View Full Code Here

          else {
            updateTableName = rootAuditedEntityQueryable.getTableName();
          }

          final Type revisionInfoIdType = sessionImplementor.getFactory().getEntityPersister( revisionInfoEntityName ).getIdentifierType();
          final String revEndColumnName = rootAuditedEntityQueryable.toColumns( auditCfg.getAuditEntCfg().getRevisionEndFieldName() )[0];

          final boolean isRevisionEndTimestampEnabled = auditCfg.getAuditEntCfg().isRevisionEndTimestampEnabled();

          // update audit_ent set REVEND = ? [, REVEND_TSTMP = ?] where (prod_ent_id) = ? and REV <> ? and REVEND is null
          final Update update = new Update( sessionImplementor.getFactory().getDialect() ).setTableName( updateTableName );
View Full Code Here

          // set REVEND = ?
          update.addColumn( revEndColumnName );
          // set [, REVEND_TSTMP = ?]
          if ( isRevisionEndTimestampEnabled ) {
            update.addColumn(
                rootAuditedEntityQueryable.toColumns( auditCfg.getAuditEntCfg().getRevisionEndTimestampFieldName() )[0]
            );
          }

          // where (prod_ent_id) = ?
          update.addPrimaryKeyColumns( rootProductionEntityQueryable.getIdentifierColumnNames() );
View Full Code Here

          // where (prod_ent_id) = ?
          update.addPrimaryKeyColumns( rootProductionEntityQueryable.getIdentifierColumnNames() );
          // where REV <> ?
          update.addWhereColumn(
              rootAuditedEntityQueryable.toColumns( auditCfg.getAuditEntCfg().getRevisionNumberPath() )[0], "<> ?"
          );
          // where REVEND is null
          update.addWhereColumn( revEndColumnName, " is null" );

          // Now lets execute the sql...
View Full Code Here

    public String[] toSqlSelectFragments(String alias) {
//      final Type type = getType();
//      final OuterJoinLoadable outerJoinLoadable = (OuterJoinLoadable) entityPersister;
      final Queryable queryable = (Queryable) entityPersister;

      return queryable.toColumns( alias, attributeName );
//      if ( type.isAssociationType() ) {
//        return JoinHelper.getLHSColumnNames(
//            (AssociationType) type,
//            propertyIndex,
//            outerJoinLoadable,
View Full Code Here

    }

    setFromElement(fromElement);
    String property = getText();
    String[] columns = getWalker().isSelectStatement()
        ? persister.toColumns(fromElement.getTableAlias(), property)
        : persister.toColumns(property);
    String text = StringHelper.join(", ", columns);
    setText(columns.length == 1 ? text : "(" + text + ")");
    setType(SqlTokenTypes.SQL_TOKEN);
View Full Code Here

    setFromElement(fromElement);
    String property = getText();
    String[] columns = getWalker().isSelectStatement()
        ? persister.toColumns(fromElement.getTableAlias(), property)
        : persister.toColumns(property);
    String text = StringHelper.join(", ", columns);
    setText(columns.length == 1 ? text : "(" + text + ")");
    setType(SqlTokenTypes.SQL_TOKEN);

    // these pieces are needed for usage in select clause
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.