Package com.im.ijcs.api.ddl
Enum JChemCols
- java.lang.Object
-
- java.lang.Enum<JChemCols>
-
- com.im.ijcs.api.ddl.JChemCols
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CD_FORMULA
CD_ID
CD_MARKUSH
CD_MOLWEIGHT
CD_SORTABLE_FORMULA
CD_STRUCTURE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDisplayName()
Get display name of the column type.static java.lang.String
getStructureColumnDisplayName(int tableType)
Get display name of the structure field (CD_STRUCTURE) based on table type.static java.lang.String
getTableDisplayName(int tableType)
Returns default display name for specific tableType.static boolean
isJChemColumn(java.lang.String columnName)
Is this column JChem reserved? In other words does the name start with "CD_" (ignore case)?java.lang.String
lowerCase()
Returns constant as lower case String, e.g.boolean
match(java.lang.String columnName)
Does columnName represent this CD_xx column? Just compare enum value toString() with columnName (case insensitive).static java.lang.String
removeJChemPrefix(java.lang.String columnName)
Remove "CD_" prefix if columnName starts with this String.static JChemCols
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static JChemCols[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CD_ID
public static final JChemCols CD_ID
-
CD_STRUCTURE
public static final JChemCols CD_STRUCTURE
-
CD_MOLWEIGHT
public static final JChemCols CD_MOLWEIGHT
-
CD_FORMULA
public static final JChemCols CD_FORMULA
-
CD_SORTABLE_FORMULA
public static final JChemCols CD_SORTABLE_FORMULA
-
CD_MARKUSH
public static final JChemCols CD_MARKUSH
-
-
Method Detail
-
values
public static JChemCols[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (JChemCols c : JChemCols.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static JChemCols valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
lowerCase
public java.lang.String lowerCase()
Returns constant as lower case String, e.g. "cd_structure"
-
getDisplayName
public java.lang.String getDisplayName()
Get display name of the column type. This name should be used for field which represent CD_xx column.
-
match
public boolean match(java.lang.String columnName)
Does columnName represent this CD_xx column? Just compare enum value toString() with columnName (case insensitive).- Parameters:
columnName
-- Returns:
- true if columnName is equalsIgnoreCase with this CD_xx constant.
-
getStructureColumnDisplayName
public static java.lang.String getStructureColumnDisplayName(int tableType)
Get display name of the structure field (CD_STRUCTURE) based on table type. Table type constants must be one ofTableTypeConstants
.
-
getTableDisplayName
public static java.lang.String getTableDisplayName(int tableType)
Returns default display name for specific tableType. Table type constants must be one ofTableTypeConstants
.
-
isJChemColumn
public static boolean isJChemColumn(java.lang.String columnName)
Is this column JChem reserved? In other words does the name start with "CD_" (ignore case)?- Parameters:
columnName
- Column name to be tested- Returns:
- true if columnName starts with "CD_" string (ignore case)
-
removeJChemPrefix
public static java.lang.String removeJChemPrefix(java.lang.String columnName)
Remove "CD_" prefix if columnName starts with this String. Otherwise returns the original String.
-
-