Package com.portal.pcm
Class Field
java.lang.Object
com.portal.pcm.Field
- All Implemented Interfaces:
Serializable,Cloneable
- Direct Known Subclasses:
BinStrField,BufField,DecimalField,Element,EnumField,ErrField,Int64Field,IntField,NumField,ObjField,PoidField,StrField,SubStructField,TextBufField,TimeField,TStampField,UIntField
The field class contains information not only on the field ID, but on the
type associated with it, and its permissions. Access methods are typed using
specific
Field subtypes to acheive compile-time type checking.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Clones a field.booleanDetermines if two fields are equal.static FieldfromName(int nameid) Constructs and returns an instance of Field based on the name ID with type of the field.static FieldConstructs and returns an instance of Field based on the name of the field.static FieldfromPINName(String name) Constructs and returns an instance of Field based on the name of the field as defined in the C header files.intgetName()Returns the field name.intReturns the field name ID.Returns the string name of the field as it appears in the C header files (for example, 'PIN_FLD_POID').static StringgetNameString(int nameID) Returns the string name of the field as it appears in the C header files (for example, 'PIN_FLD_POID').Returns a string representing the PIN type name of this field.intReturns the type name.inthashCode()Returns a hash value for this object.static StringmacroToClass(String name) Converts a string field name from the PIN macro form to the Java class name form.toString()Returns a string representation of field.
-
Field Details
-
TYPE_UNUSED
public static final int TYPE_UNUSED- See Also:
-
TYPE_INT
public static final int TYPE_INT- See Also:
-
TYPE_UINT
public static final int TYPE_UINT- See Also:
-
TYPE_ENUM
public static final int TYPE_ENUM- See Also:
-
TYPE_NUM
public static final int TYPE_NUM- See Also:
-
TYPE_STR
public static final int TYPE_STR- See Also:
-
TYPE_BUF
public static final int TYPE_BUF- See Also:
-
TYPE_POID
public static final int TYPE_POID- See Also:
-
TYPE_TSTAMP
public static final int TYPE_TSTAMP- See Also:
-
TYPE_ARRAY
public static final int TYPE_ARRAY- See Also:
-
TYPE_SUBSTRUCT
public static final int TYPE_SUBSTRUCT- See Also:
-
TYPE_OBJ
public static final int TYPE_OBJ- See Also:
-
TYPE_BINSTR
public static final int TYPE_BINSTR- See Also:
-
TYPE_ERR
public static final int TYPE_ERR- See Also:
-
TYPE_DECIMAL
public static final int TYPE_DECIMAL- See Also:
-
TYPE_TIME
public static final int TYPE_TIME- See Also:
-
TYPE_TEXTBUF
public static final int TYPE_TEXTBUF- See Also:
-
TYPE_INT64
public static final int TYPE_INT64- See Also:
-
OPFLG_CUST_FLDS_ONLY
public static final int OPFLG_CUST_FLDS_ONLY- See Also:
-
PIN_DD_FLDS_CUST_FLDS_MIN_RANGE1
public static final int PIN_DD_FLDS_CUST_FLDS_MIN_RANGE1- See Also:
-
PIN_DD_FLDS_CUST_FLDS_MAX_RANGE1
public static final int PIN_DD_FLDS_CUST_FLDS_MAX_RANGE1- See Also:
-
PIN_DD_FLDS_CUST_FLDS_MIN_RANGE2
public static final int PIN_DD_FLDS_CUST_FLDS_MIN_RANGE2- See Also:
-
-
Constructor Details
-
Field
Constructs an instance ofFieldfrom a name ID , typeID and name .- Parameters:
nameID- A valid Portal field name.typeID- A valid Portal storable class type name.name- Name of the field.
-
Field
public Field(int nameID, int typeID) Constructs an instance ofFieldfrom a name ID and a type ID.- Parameters:
nameID- A valid Portal field name.typeID- A valid Portal storable class type name.
-
-
Method Details
-
fromPINName
Constructs and returns an instance of Field based on the name of the field as defined in the C header files.- Parameters:
name- The Field name string.- Returns:
- A Field instance
-
fromName
Constructs and returns an instance of Field based on the name of the field. If the name is in the form 'package.name', it is used literally. Otherwise, it is prepended by 'com.portal.pcm.fields.'. OrigName can be in the below formats- com.portal.pcm.fields.< FieldName>
- PIN_FLD_XXX - OOB field with PIN_FLD_ prefix
- XXX_XXX - OOB field without PIN_FLD_ prefix
- PIN_FLD_XXX_XXX - custom field with PIN_FLD_ prefix
- XXX_XXX - custom field without PIN_FLD_ prefix
- FldPoid ,FldItems ,FldCustomerSegmentList,FldItemObj ..etc
- UnknownField123
- Parameters:
origName- The Field name string- Returns:
- A Field instance
-
fromName
Constructs and returns an instance of Field based on the name ID with type of the field. If the ID doesn't match any known Fields, one will be constructed.- Parameters:
nameid- The name ID of the field with type, as in the C headers- Returns:
- A Field instance
-
clone
Clones a field.- Overrides:
clonein classObject- Returns:
- Clone of field.
- Throws:
CloneNotSupportedException- thown if not supported.
-
getTypeID
public int getTypeID()Returns the type name.- Returns:
- The type name ID. 0 if not known.
-
getNameID
public int getNameID()Returns the field name ID.- Returns:
- The Field name ID without type information.
-
getName
public int getName()Returns the field name.- Returns:
- The Field name with type information.
-
getNameString
Returns the string name of the field as it appears in the C header files (for example, 'PIN_FLD_POID').- Returns:
- The field name string as it appears in C header files.
-
getNameString
Returns the string name of the field as it appears in the C header files (for example, 'PIN_FLD_POID').- Parameters:
nameID- - A valid Portal field nameID.- Returns:
- The field name string as it appears in C header files.
-
macroToClass
Converts a string field name from the PIN macro form to the Java class name form.- Parameters:
name- Field name in PIN macro form.- Returns:
- A string containing the equivelant class name.
-
getPINType
Returns a string representing the PIN type name of this field.- Returns:
- Type name in PIN format.
-
hashCode
public int hashCode()Returns a hash value for this object. -
equals
Determines if two fields are equal. This is true when their names match. -
toString
Returns a string representation of field.
-