Class UniqueNumberGeneratorExtended
- java.lang.Object
-
- de.uplanet.lucy.server.util.numbergenerator.UniqueNumberGeneratorExtended
-
@Scriptable public class UniqueNumberGeneratorExtended extends Object
Generates a unique id number per Signature. (e.g. ITS-20051104-002)
-
-
Constructor Summary
Constructors Constructor Description UniqueNumberGeneratorExtended()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getExtendedNumber(de.uplanet.jdbc.JdbcConnection p_conn, FieldInfo p_field, String p_strSearchString, String p_strGenerateString, int p_iIndexNoStart, int p_iIndexNoEnd)
Stores the last number within a map per fieldGuid and searchString.static void
reset(String p_strGuid)
Reset the number generator for the passed field GUID.
-
-
-
Method Detail
-
getExtendedNumber
public static String getExtendedNumber(de.uplanet.jdbc.JdbcConnection p_conn, FieldInfo p_field, String p_strSearchString, String p_strGenerateString, int p_iIndexNoStart, int p_iIndexNoEnd) throws de.uplanet.jdbc.sqlhelper.SqlHelperException, SQLException
Stores the last number within a map per fieldGuid and searchString. If the map has no entry it gets the last out of the database. Generates the new number, stores it and returns it.- Parameters:
p_conn
- Database Connection for the Datatablep_field
- Fielddescriptionp_strSearchString
- SearchStringp_strGenerateString
- String for generating the next numberp_iIndexNoStart
- index start for the number to countp_iIndexNoEnd
- index end for the number to count- Returns:
- new generated number String
- Throws:
de.uplanet.jdbc.sqlhelper.SqlHelperException
SQLException
-
reset
public static void reset(String p_strGuid)
Reset the number generator for the passed field GUID.
-
-