org.archiviststoolkit.structure
Class ATFieldInfo
java.lang.Object
org.archiviststoolkit.structure.ATFieldInfo
- All Implemented Interfaces:
- java.lang.Comparable
public class ATFieldInfo
- extends java.lang.Object
- implements java.lang.Comparable
Constructor Summary |
ATFieldInfo(java.lang.Class clazz,
java.lang.String fieldName)
|
Method Summary |
static void |
assignLabelInfo(javax.swing.JLabel label,
java.lang.Class clazz,
java.lang.String fieldName)
|
static int |
checkFieldLength(java.lang.Class clazz,
java.lang.String fieldName)
|
int |
compareTo(java.lang.Object o)
Compares this object with the specified object for order. |
boolean |
equals(java.lang.Object o)
|
static void |
fixBlankFieldLabels(org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps)
|
java.lang.Class |
getClazz()
|
java.lang.String |
getDataType()
|
java.lang.Class |
getFieldClass()
|
static ATFieldInfo |
getFieldInfo(java.lang.Class clazz,
java.lang.String fieldName)
|
static ATFieldInfo |
getFieldInfo(java.lang.String key)
|
static ATFieldInfo |
getFieldInfo(java.lang.String className,
java.lang.String fieldName)
|
static java.util.ArrayList<ATFieldInfo> |
getFieldInfoByLookupListName(java.lang.String listName)
|
java.lang.String |
getFieldLabel()
|
static java.lang.Object[] |
getFieldListByTableName(java.lang.String tableName)
|
static java.lang.Object[] |
getFieldListByTableNameForDefaultValues(DatabaseTables table)
|
java.lang.String |
getFieldName()
|
static java.util.ArrayList<ATFieldInfo> |
getFieldsForRDE(java.lang.Class clazz)
|
static java.util.ArrayList<ATFieldInfo> |
getFieldsThatNeedStringValidation(java.lang.Class clazz)
|
java.lang.reflect.Method |
getGetMethod()
|
java.lang.Boolean |
getIncludeInRDE()
|
static java.lang.String |
getLabel(java.lang.Class clazz,
java.lang.String fieldName)
|
java.lang.String |
getLookupList()
|
java.lang.String |
getPopupHelpText()
|
static java.util.TreeSet<ATFieldInfo> |
getReturnScreenList(java.lang.Class clazz)
|
java.lang.Integer |
getReturnScreenOrder()
|
java.lang.reflect.Method |
getSetMethod()
|
java.lang.Integer |
getStringLengthLimit()
|
static DatabaseTables |
getTableByTableName(java.lang.String tableName)
|
static java.lang.Object[] |
getTableList()
|
static java.lang.Object[] |
getTableListForDefaultValues()
|
java.lang.String |
getTableName()
|
static java.lang.String |
getToolTip(java.lang.Class clazz,
java.lang.String fieldName)
|
static void |
importFieldDefinitionsAndExamples(java.io.File file)
|
static void |
importFieldDefinitionsAndExamples(java.io.File file,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps,
boolean preserveExistingFieldLabels)
|
static void |
initDatabaseTables()
|
static void |
loadFieldList()
|
static void |
reconcileFieldDefinitionsAndExamples(java.io.File file,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps)
|
static void |
restoreDefaults(org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress)
|
void |
setClazz(java.lang.Class clazz)
|
void |
setDataType(java.lang.String dataType)
|
void |
setFieldClass(java.lang.Class fieldClass)
|
void |
setFieldLabel(java.lang.String fieldLabel)
|
void |
setFieldName(java.lang.String fieldName)
|
void |
setGetMethod(java.lang.reflect.Method getMethod)
|
void |
setIncludeInRDE(java.lang.Boolean includeInRDE)
|
void |
setLookupList(java.lang.String lookupList)
|
void |
setPopupHelpText(java.lang.String definition,
java.lang.String examples)
|
void |
setReturnScreenOrder(java.lang.Integer returnScreenOrder)
|
void |
setSetMethod(java.lang.reflect.Method setMethod)
|
void |
setStringLengthLimit(java.lang.Integer stringLengthLimit)
|
static void |
updateFieldInfoForAllTables()
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ATFieldInfo
public ATFieldInfo(java.lang.Class clazz,
java.lang.String fieldName)
getFieldName
public java.lang.String getFieldName()
setFieldName
public void setFieldName(java.lang.String fieldName)
getFieldLabel
public java.lang.String getFieldLabel()
setFieldLabel
public void setFieldLabel(java.lang.String fieldLabel)
getPopupHelpText
public java.lang.String getPopupHelpText()
setPopupHelpText
public void setPopupHelpText(java.lang.String definition,
java.lang.String examples)
getTableList
public static java.lang.Object[] getTableList()
getTableListForDefaultValues
public static java.lang.Object[] getTableListForDefaultValues()
getFieldListByTableNameForDefaultValues
public static java.lang.Object[] getFieldListByTableNameForDefaultValues(DatabaseTables table)
getFieldListByTableName
public static java.lang.Object[] getFieldListByTableName(java.lang.String tableName)
getTableByTableName
public static DatabaseTables getTableByTableName(java.lang.String tableName)
loadFieldList
public static void loadFieldList()
getReturnScreenList
public static java.util.TreeSet<ATFieldInfo> getReturnScreenList(java.lang.Class clazz)
throws TableNotConfiguredException
- Throws:
TableNotConfiguredException
getFieldsForRDE
public static java.util.ArrayList<ATFieldInfo> getFieldsForRDE(java.lang.Class clazz)
throws TableNotConfiguredException
- Throws:
TableNotConfiguredException
getFieldsThatNeedStringValidation
public static java.util.ArrayList<ATFieldInfo> getFieldsThatNeedStringValidation(java.lang.Class clazz)
getFieldInfo
public static ATFieldInfo getFieldInfo(java.lang.String key)
getFieldInfo
public static ATFieldInfo getFieldInfo(java.lang.Class clazz,
java.lang.String fieldName)
getFieldInfo
public static ATFieldInfo getFieldInfo(java.lang.String className,
java.lang.String fieldName)
getLabel
public static java.lang.String getLabel(java.lang.Class clazz,
java.lang.String fieldName)
getToolTip
public static java.lang.String getToolTip(java.lang.Class clazz,
java.lang.String fieldName)
assignLabelInfo
public static void assignLabelInfo(javax.swing.JLabel label,
java.lang.Class clazz,
java.lang.String fieldName)
getFieldInfoByLookupListName
public static java.util.ArrayList<ATFieldInfo> getFieldInfoByLookupListName(java.lang.String listName)
initDatabaseTables
public static void initDatabaseTables()
importFieldDefinitionsAndExamples
public static void importFieldDefinitionsAndExamples(java.io.File file)
importFieldDefinitionsAndExamples
public static void importFieldDefinitionsAndExamples(java.io.File file,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps,
boolean preserveExistingFieldLabels)
fixBlankFieldLabels
public static void fixBlankFieldLabels(org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps)
restoreDefaults
public static void restoreDefaults(org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress)
getLookupList
public java.lang.String getLookupList()
setLookupList
public void setLookupList(java.lang.String lookupList)
getReturnScreenOrder
public java.lang.Integer getReturnScreenOrder()
setReturnScreenOrder
public void setReturnScreenOrder(java.lang.Integer returnScreenOrder)
compareTo
public int compareTo(java.lang.Object o)
- Compares this object with the specified object for order. Returns a
negative integer, zero, or a positive integer as this object is less
than, equal to, or greater than the specified object.
In the foregoing description, the notation
sgn(expression) designates the mathematical
signum function, which is defined to return one of -1,
0, or 1 according to whether the value of expression
is negative, zero or positive.
The implementor must ensure sgn(x.compareTo(y)) ==
-sgn(y.compareTo(x)) for all x and y. (This
implies that x.compareTo(y) must throw an exception iff
y.compareTo(x) throws an exception.)
The implementor must also ensure that the relation is transitive:
(x.compareTo(y)>0 && y.compareTo(z)>0) implies
x.compareTo(z)>0.
Finally, the implementer must ensure that x.compareTo(y)==0
implies that sgn(x.compareTo(z)) == sgn(y.compareTo(z)), for
all z.
It is strongly recommended, but not strictly required that
(x.compareTo(y)==0) == (x.equals(y)). Generally speaking, any
class that implements the Comparable interface and violates
this condition should clearly indicate this fact. The recommended
language is "Note: this class has a natural ordering that is
inconsistent with equals."
- Specified by:
compareTo
in interface java.lang.Comparable
- Parameters:
o
- the Object to be compared.
- Returns:
- a negative integer, zero, or a positive integer as this object
is less than, equal to, or greater than the specified object.
- Throws:
java.lang.ClassCastException
- if the specified object's type prevents it
from being compared to this Object.
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
getDataType
public java.lang.String getDataType()
setDataType
public void setDataType(java.lang.String dataType)
getClazz
public java.lang.Class getClazz()
setClazz
public void setClazz(java.lang.Class clazz)
getTableName
public java.lang.String getTableName()
getGetMethod
public java.lang.reflect.Method getGetMethod()
setGetMethod
public void setGetMethod(java.lang.reflect.Method getMethod)
getFieldClass
public java.lang.Class getFieldClass()
setFieldClass
public void setFieldClass(java.lang.Class fieldClass)
reconcileFieldDefinitionsAndExamples
public static void reconcileFieldDefinitionsAndExamples(java.io.File file,
org.netbeans.spi.wizard.DeferredWizardResult.ResultProgressHandle progress,
int currentStep,
int numberOfSteps)
updateFieldInfoForAllTables
public static void updateFieldInfoForAllTables()
checkFieldLength
public static int checkFieldLength(java.lang.Class clazz,
java.lang.String fieldName)
getStringLengthLimit
public java.lang.Integer getStringLengthLimit()
setStringLengthLimit
public void setStringLengthLimit(java.lang.Integer stringLengthLimit)
getSetMethod
public java.lang.reflect.Method getSetMethod()
setSetMethod
public void setSetMethod(java.lang.reflect.Method setMethod)
getIncludeInRDE
public java.lang.Boolean getIncludeInRDE()
setIncludeInRDE
public void setIncludeInRDE(java.lang.Boolean includeInRDE)