Package org.conserve.tools.uniqueid

Examples of org.conserve.tools.uniqueid.UniqueIdTree


      return fromId;
    }
    else
    {
      UniqueIdGenerator generator = new UniqueIdGenerator();
      UniqueIdTree tree = new UniqueIdTree(generator);
      tree.nameStack(fromStack);
      IdStatementGenerator idGen = new IdStatementGenerator(adapter, fromStack, true);
      String idStatement = idGen.generate(targetLevel);
      StringBuilder sb = new StringBuilder("SELECT ");
      sb.append(fromStack.getRepresentation(level).getAsName());
      sb.append(".");
View Full Code Here


  }

  private StatementPrototype generate(ObjectStack stack, boolean addJoins) throws SQLException
  {
    typeStack = stack;
    typeIds = new UniqueIdTree(uidGenerator);
    typeIds.nameStack(typeStack);

    StatementPrototype res = new StatementPrototype(adapter, typeStack, typeStack.getActualRepresentation()
        .getRepresentedClass(), addJoins);
View Full Code Here

   * @param stack
   */
  private void nameStack(String propertyName, ObjectStack stack)
  {

    UniqueIdTree propertyTree = parameterTypeIds.get(propertyName);
    if (propertyTree == null)
    {
      // if this property has not been part of the query previously, add a
      // new
      // propertyTree for it.
      propertyTree = new UniqueIdTree(uidGenerator);
      parameterTypeIds.put(propertyName, propertyTree);
    }
    propertyTree.nameStack(stack);
  }
View Full Code Here

   * @throws SQLException
   */
  private void moveField(ObjectStack nuObjectStack, String colName, int fromLevel, int toLevel, ConnectionWrapper cw) throws SQLException
  {
    //generate aliases
    UniqueIdTree idTree = new UniqueIdTree(new UniqueIdGenerator());
    idTree.nameStack(nuObjectStack);

    String fromTable = nuObjectStack.getRepresentation(fromLevel).getTableName();
    String fromTableAs = nuObjectStack.getRepresentation(fromLevel).getAsName();
    String toTable = nuObjectStack.getRepresentation(toLevel).getTableName();
    String toTableAs = nuObjectStack.getRepresentation(toLevel).getAsName();
View Full Code Here

TOP

Related Classes of org.conserve.tools.uniqueid.UniqueIdTree

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.