All Packages Class Hierarchy This Package Previous Next Index
Class com.las.ogdi.OGDIAttributeFormat
java.lang.Object
|
+----com.las.ogdi.OGDIAttributeFormat
- public class OGDIAttributeFormat
- extends Object
The AttributeFormat class defines information on one attribute.
- Version:
- 1.0
- Author:
- Las Inc.
-
OGDIAttributeFormat(String, Class, int, int, boolean)
- Creates an AttributeFormat instance.
-
getLength()
- Gets the total length of an attribute.
-
getName()
- Gets the name of an attribute.
-
getNullable()
- Gets the nullable quality of an attribute.
-
getPrecision()
- Gets the precision of an attribute (for real numbers, 0 otherwise).
-
getType()
- Gets the class type of an attribute.
-
toString()
- Gets the complete attribute description.
OGDIAttributeFormat
public OGDIAttributeFormat(String name,
Class type,
int length,
int precision,
boolean nullable)
- Creates an AttributeFormat instance.
- Parameters:
- name - the name of the attribute
- type - the class type of the attribute
- length - the length of the attribute in characters
- precision - the number of decimal digits
- nullable - true if it can be null, false otherwise
- Returns:
- no return
- Throws: IllegalArgumentException
- if length, precision too small or name, type is null
getName
public String getName()
- Gets the name of an attribute.
- Parameters:
- no - parameter
- Returns:
- a string name
- Throws: no
- exception
getType
public Class getType()
- Gets the class type of an attribute.
- Parameters:
- no - parameter
- Returns:
- a type number
- Throws: no
- exception
getLength
public int getLength()
- Gets the total length of an attribute.
- Parameters:
- no - parameter
- Returns:
- a length number
- Throws: no
- exception
getPrecision
public int getPrecision()
- Gets the precision of an attribute (for real numbers, 0 otherwise).
- Parameters:
- no - parameter
- Returns:
- a number of digits after the point
- Throws: no
- exception
getNullable
public boolean getNullable()
- Gets the nullable quality of an attribute.
- Parameters:
- no - parameter
- Returns:
- true if can be null, false otherwise
- Throws: no
- exception
toString
public String toString()
- Gets the complete attribute description.
- Parameters:
- no - parameter
- Returns:
- the attribute name, type, length, precision and if nullable as a string
- Throws: no
- exception
- Overrides:
- toString in class Object
All Packages Class Hierarchy This Package Previous Next Index