Class UniqueNumberGenerator

java.lang.Object
de.uplanet.lucy.server.businesslogic.util.UniqueNumberGenerator

@Scriptable public final class UniqueNumberGenerator extends Object
Generates a unique id number.
  • Constructor Details

    • UniqueNumberGenerator

      public UniqueNumberGenerator()
  • Method Details

    • get

      public static int get(de.uplanet.jdbc.JdbcConnection p_conn, FieldInfo p_fieldInfo) throws SQLException
      Parameters:
      p_conn - database connection used to retrieve an initial number value
      p_fieldInfo - The data field that should be incremented.
      Returns:
      a unique number for the guid
      Throws:
      SQLException
    • getCurrentNumber

      public static int getCurrentNumber(FieldInfo p_fieldInfo)
      Parameters:
      p_fieldInfo - The data field that should be incremented.
      Returns:
      get the next unique number without generating a new one. (Twice calls will get the same number)
    • reset

      public static void reset(String p_strGuid)
      reset number generation for passed field guid