|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bibalex.daf.managers.checkin.ExternalID
public class ExternalID
Represents a row in the ExternalID table.
Field Summary | |
---|---|
private DBConnection |
conn
|
private int |
id
|
private boolean |
isDefault
|
private int |
jobID
|
private java.util.Date |
timeStamp
|
private int |
typeID
|
private java.lang.String |
typeName
|
private java.lang.String |
value
|
Constructor Summary | |
---|---|
ExternalID()
Creates a new instance of ExternalID. This constructor leaves all the fields empty. |
|
ExternalID(DataTable table)
Creates a new instance of ExternalID. This constructor fills all the fields from the DataTable. |
|
ExternalID(int id,
java.lang.String value,
int typeID,
boolean isDefault,
int jobID,
java.util.Date timeStamp)
Creates a new instance of ExternalID. |
Method Summary | |
---|---|
boolean |
add()
Adds this entry to the database. Note: The date is ignored while adding as the underlying stored procedure uses Now() for the date. |
static ExternalID |
getByID(int id)
Gets the ExternalID object that has the given ID. |
static ExternalID[] |
getByJob(int jobID)
Gets all the external IDs that belong to this job. |
DBConnection |
getConn()
|
static ExternalID |
getDefaults(int jobID)
Gets dafult ExtID value and ExtID type |
int |
getID()
|
int |
getJobID()
|
java.util.Date |
getTimeStamp()
|
int |
getTypeID()
|
java.lang.String |
getTypeName()
|
java.lang.String |
getValue()
|
boolean |
isDefault()
|
static int |
occurrencesInDatabase(int typeID,
java.lang.String value)
Gets the number of the occurrences for the given type-value pair. |
void |
setDefault(boolean isDefault)
|
void |
setFieldsFromDataTable(DataTable table)
Uses the given DataTable to set the fields. |
void |
setID(int id)
|
void |
setJobID(int jobID)
|
void |
setTimeStamp(java.util.Date timeStamp)
|
void |
setTypeID(int typeID)
|
void |
setTypeName(java.lang.String typeName)
|
void |
setValue(java.lang.String value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private DBConnection conn
private int id
private java.lang.String value
private int typeID
private java.lang.String typeName
private boolean isDefault
private int jobID
private java.util.Date timeStamp
Constructor Detail |
---|
public ExternalID()
public ExternalID(int id, java.lang.String value, int typeID, boolean isDefault, int jobID, java.util.Date timeStamp)
id
- The ID value.value
- The value.typeID
- The type ID value.isDefault
- The is Default value.jobID
- The job ID value.timeStamp
- The TimeStamp value.public ExternalID(DataTable table) throws java.lang.Exception
table
- The DataTable used to construct the object.
java.lang.Exception
- If the ExternalID couldn't be constructed from the DataTable.Method Detail |
---|
public void setFieldsFromDataTable(DataTable table) throws java.lang.Exception
table
- The DataTable used to set the fields.
java.lang.Exception
- If the fields couldn't be filled from the DataTable.public boolean add()
public DBConnection getConn()
public int getID()
public void setID(int id)
id
- The id to set.public boolean isDefault()
public void setDefault(boolean isDefault)
isDefault
- The isDefault to set.public int getJobID()
public void setJobID(int jobID)
jobID
- The jobID to set.public java.util.Date getTimeStamp()
public void setTimeStamp(java.util.Date timeStamp)
timeStamp
- The timeStamp to set.public int getTypeID()
public void setTypeID(int typeID)
typeID
- The typeID to set.public java.lang.String getTypeName()
public void setTypeName(java.lang.String typeName)
typeName
- The typeName to set.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- The value to set.public static ExternalID[] getByJob(int jobID) throws java.lang.Exception
jobID
- The ID of the job to get its ExternalID rows.
java.lang.Exception
- If the database couldn't be queried.public static ExternalID getByID(int id) throws java.lang.Exception
id
- The ID of the ExternalID object.
java.lang.Exception
- If the database couldn't be queried.public static ExternalID getDefaults(int jobID) throws java.lang.Exception
jobID
-
java.lang.Exception
- If the database couldn't be queried.public static int occurrencesInDatabase(int typeID, java.lang.String value)
typeID
- The type ID to search forvalue
- The value to search for.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |