|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.db.ProfileFldDefOps
public class ProfileFldDefOps
Provides database operations for inserting, updating and deleting field definitions. Field definitions are represented by ProfileFieldMetaData objects. The methods that perform SELECTs, return ProfileFieldMetaData instances or Enumerations of them. The methods that INSERT and UPDATE take ProfileFieldMetaData instances as parameters.
This class has no application knowledge in it. The data is not validated before committing it to the database. That is the responsibility of the caller.
Field Summary | |
---|---|
static java.util.ResourceBundle |
fldNames
|
Constructor Summary | |
---|---|
ProfileFldDefOps()
|
Method Summary | |
---|---|
static void |
addFieldDefinition(java.sql.Connection conn,
ProfileFieldMetaData md)
Inserts a field definition. |
static void |
addFieldDefinition(ProfileFieldMetaData md)
Inserts a field definition. |
static void |
deleteFieldDefinition(java.sql.Connection conn,
java.lang.String fldID)
Deletes an extended field definition. |
static void |
deleteFieldDefinition(java.lang.String fldID)
Deletes an extended field definition. |
static boolean |
doesFieldExists(java.sql.Connection conn,
java.lang.String name,
java.lang.String table,
java.lang.String col)
|
static boolean |
doesFieldExists(java.lang.String name,
java.lang.String table,
java.lang.String col)
|
static ProfileFieldMetaData |
getFieldDefFromId(java.lang.String fieldId)
Retrieves an extended field definition. |
static ProfileFieldMetaData |
getFieldDefinition(java.sql.Connection conn,
java.lang.String name)
Retrieves an extended field definition. |
static ProfileFieldMetaData |
getFieldDefinition(java.sql.Connection conn,
java.lang.String table,
java.lang.String column)
Retrieves an standard field definition. |
static ProfileFieldMetaData |
getFieldDefinition(java.lang.String name)
Retrieves an extended field definition. |
static ProfileFieldMetaData |
getFieldDefinition(java.lang.String table,
java.lang.String column)
Retrieves an standard field definition. |
static ProfileFieldMetaData |
getFldDefinition(java.lang.String name,
java.lang.String grpId)
This returns the ProfileFieldMetaData with the given FieldName and group Id |
static java.util.Enumeration |
getGroupFieldDefs(java.sql.Connection conn,
int groupID,
boolean extended,
boolean deleted)
Retrieves field definitions by group. |
static java.util.Enumeration |
getGroupFieldDefs(int groupID)
For testing and import/export. |
static java.util.Enumeration |
getGroupFieldDefs(int groupID,
boolean extended,
boolean deleted)
Retrieves field definitions by group. |
static java.lang.String[] |
queryFieldDefsByName(java.lang.String regexName)
|
static void |
safeDeleteFieldDefinition(java.sql.Connection conn,
ProfileFieldMetaData md)
Marks an extended field definition as deleted. |
static void |
safeDeleteFieldDefinition(ProfileFieldMetaData md)
Marks an extended field definition as deleted. |
static void |
updateFieldDefinition(java.sql.Connection conn,
ProfileFieldMetaData md)
Updates a field definition. |
static void |
updateFieldDefinition(ProfileFieldMetaData md)
Updates a field definition. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.util.ResourceBundle fldNames
Constructor Detail |
---|
public ProfileFldDefOps()
Method Detail |
---|
public static java.util.Enumeration getGroupFieldDefs(int groupID, boolean extended, boolean deleted) throws java.sql.SQLException, ProfileStoreException
groupID
- identifies the group to retrieve fields forextended
- indicates whether to retrieve extended or standard fields. Pass true
for extended
fields and false
for standard fields.deleted
- indicates whether to retrieve deleted or active fields. This paramater applies only if
extended is true
. Otherwise, it is ignored. Pass true
for deleted fields and
false
for active fields.
java.sql.SQLException
ProfileStoreException
public static java.util.Enumeration getGroupFieldDefs(java.sql.Connection conn, int groupID, boolean extended, boolean deleted) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasegroupID
- identifies the group to retrieve fields forextended
- indicates whether to retrieve extended or standard fields. Pass true
for extended
fields and false
for standard fields.deleted
- indicates whether to retrieve deleted or active extended fields. This paramater applies only if
extended is true
. Otherwise, it is ignored. Pass true
for deleted fields and
false
for active fields.
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFieldDefinition(java.lang.String name) throws java.sql.SQLException, ProfileStoreException
name
- the name of the extended field
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFldDefinition(java.lang.String name, java.lang.String grpId) throws java.sql.SQLException, ProfileStoreException
name
- grpId
-
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFieldDefFromId(java.lang.String fieldId) throws java.sql.SQLException, ProfileStoreException
fieldId
- profilefieldId
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFieldDefinition(java.sql.Connection conn, java.lang.String name) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasename
- the name of the extended field
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFieldDefinition(java.lang.String table, java.lang.String column) throws java.sql.SQLException, ProfileStoreException
table
- the table of the standard fieldtable
- the column of the standard field
java.sql.SQLException
ProfileStoreException
public static ProfileFieldMetaData getFieldDefinition(java.sql.Connection conn, java.lang.String table, java.lang.String column) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasetable
- the table of the standard fieldcolumn
- the column of the standard field
java.sql.SQLException
ProfileStoreException
public static void addFieldDefinition(ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
fld
- the ExtendedProfileField to be inserted to the database
java.sql.SQLException
ProfileStoreException
public static void addFieldDefinition(java.sql.Connection conn, ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
Side effect: set's the FieldID of the supplied ProfileFieldMetaData
conn
- an open Connection to the Trading Networks databasefld
- the ExtendedProfileField to be inserted to the database
java.sql.SQLException
ProfileStoreException
public static void updateFieldDefinition(ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
fld
- the ExtendedProfileField to be inserted to the database
java.sql.SQLException
ProfileStoreException
public static void updateFieldDefinition(java.sql.Connection conn, ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasefld
- the ExtendedProfileField to be inserted to the database
java.sql.SQLException
ProfileStoreException
public static void safeDeleteFieldDefinition(ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
md
- a ProfileFieldMetaData that represents the field definition to be deleted
java.sql.SQLException
ProfileStoreException
public static void safeDeleteFieldDefinition(java.sql.Connection conn, ProfileFieldMetaData md) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasemd
- a ProfileFieldMetaData that represents the field definition to be deleted
java.sql.SQLException
ProfileStoreException
public static void deleteFieldDefinition(java.lang.String fldID) throws java.sql.SQLException, ProfileStoreException
fldID
- the ProfileFieldID of the extended field to be deleted. Given a ProfileField instance, this value
can be retrieved by calling getMetaData().getFieldID()
on it.
java.sql.SQLException
ProfileStoreException
public static void deleteFieldDefinition(java.sql.Connection conn, java.lang.String fldID) throws java.sql.SQLException, ProfileStoreException
conn
- an open Connection to the Trading Networks databasefldID
- the ProfileFieldID of the extended field to be deleted. Given a ProfileField instance, this value
can be retrieved by calling getMetaData().getFieldID()
on it.
java.sql.SQLException
ProfileStoreException
public static java.util.Enumeration getGroupFieldDefs(int groupID) throws java.sql.SQLException, ProfileStoreException
java.sql.SQLException
ProfileStoreException
public static boolean doesFieldExists(java.lang.String name, java.lang.String table, java.lang.String col) throws java.sql.SQLException
java.sql.SQLException
public static boolean doesFieldExists(java.sql.Connection conn, java.lang.String name, java.lang.String table, java.lang.String col) throws java.sql.SQLException
java.sql.SQLException
public static java.lang.String[] queryFieldDefsByName(java.lang.String regexName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |