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.

Constructor Index

 o OGDIAttributeFormat(String, Class, int, int, boolean)
Creates an AttributeFormat instance.

Method Index

 o getLength()
Gets the total length of an attribute.
 o getName()
Gets the name of an attribute.
 o getNullable()
Gets the nullable quality of an attribute.
 o getPrecision()
Gets the precision of an attribute (for real numbers, 0 otherwise).
 o getType()
Gets the class type of an attribute.
 o toString()
Gets the complete attribute description.

Constructors

 o 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

Methods

 o getName
 public String getName()
Gets the name of an attribute.

Parameters:
no - parameter
Returns:
a string name
Throws: no
exception
 o getType
 public Class getType()
Gets the class type of an attribute.

Parameters:
no - parameter
Returns:
a type number
Throws: no
exception
 o getLength
 public int getLength()
Gets the total length of an attribute.

Parameters:
no - parameter
Returns:
a length number
Throws: no
exception
 o 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
 o 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
 o 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