Package org.conserve.tools.uniqueid

Examples of org.conserve.tools.uniqueid.UniqueIdGenerator


   */
  @Test
  public void testNext()
  {
    ArrayList<String> seen = new ArrayList<String>();
    UniqueIdGenerator generator = new UniqueIdGenerator();
    for(int x = 0;x<10000;x++)
    {
      String value = generator.next();
      assertTrue(value.length()>0);
      assertFalse(seen.contains(value));
      seen.add(value);
    }
  }
View Full Code Here


      // no need to change it, as it's already cast to the correct class.
      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 ");
View Full Code Here

  private Clause[] clauses;

  public StatementPrototypeGenerator(AdapterBase adapter)
  {
    this.adapter = adapter;
    this.uidGenerator = new UniqueIdGenerator();
    parameterTypeIds = new HashMap<String, UniqueIdTree>();
  }
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();
View Full Code Here

TOP

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

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.