public class IlvAttributeInfoProperty extends IlvNamedProperty
IlvAttributeProperty
.IlvAttributeProperty
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
NAME
The name of the property
|
Constructor and Description |
---|
IlvAttributeInfoProperty(IlvAttributeInfoProperty source)
Creates a new
IlvAttributeInfoProperty by copying an
existing one. |
IlvAttributeInfoProperty(IlvInputStream stream)
Creates a new
IlvAttributeInfoProperty from
an IlvInputStream . |
IlvAttributeInfoProperty(String[] attributeNames,
Class<?>[] attributeClasses,
boolean[] nullable)
Creates a new
IlvAttributeInfoProperty with the
specified attribute names and classes. |
Modifier and Type | Method and Description |
---|---|
IlvNamedProperty |
copy()
Copies the property.
|
Class<?> |
getAttributeClass(int i)
Returns the class of the attribute specified by the index
i . |
int |
getAttributeIndex(String name)
Returns the index of the first attribute with the specified name.
|
String |
getAttributeName(int i)
Returns the name of the attribute specified by the index
i . |
Enumeration<Class<?>> |
getAttributesClasses()
Returns the classes of the attributes.
|
int |
getAttributesCount()
Returns the count of attributes.
|
Enumeration<String> |
getAttributesNames()
Returns the names of the attributes.
|
boolean |
isNullable(int i)
Returns true if the attribute specified by the index
i
can have a null value. |
boolean |
isPersistent()
Returns true if the property must be saved to an IVL file.
|
void |
setPersistent(boolean persistent)
Specifies whether the property must be saved to an IVL file.
|
void |
write(IlvOutputStream stream)
Writes the property to an
IlvOutputStream . |
getName
public static final String NAME
public IlvAttributeInfoProperty(String[] attributeNames, Class<?>[] attributeClasses, boolean[] nullable)
IlvAttributeInfoProperty
with the
specified attribute names and classes. String
as its argument. The attributes are saved as the
String
returned by the toString
method.
These attributes are built with this String
when they
are read.
Following are examples of valid classes: java.lang.String,
java.lang.Integer, java.lang.Float, java.lang.Boolean
.
IlvPersistentObject
interface.
attributeNames
- The names of the attributesattributeClasses
- The classes of the attributes.nullable
- A boolean array that takes the true
value for the
attributes that can have a null value (these attributes
are optional).IllegalArgumentException
- if the arrays of names,
classes, and nullable values
have different lengths.IlvPersistentObject
public IlvAttributeInfoProperty(IlvAttributeInfoProperty source)
IlvAttributeInfoProperty
by copying an
existing one.source
- The named property to be copied.public IlvAttributeInfoProperty(IlvInputStream stream) throws IlvReadFileException
IlvAttributeInfoProperty
from
an IlvInputStream
.stream
- the input streamIlvReadFileException
- if an error occurs while reading.public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvNamedProperty
stream
- the output stream.IOException
- standard IO error.public IlvNamedProperty copy()
copy
in class IlvNamedProperty
public void setPersistent(boolean persistent)
persistent
- True if the property must be saved to an IVL file,
false otherwise.public boolean isPersistent()
isPersistent
in class IlvNamedProperty
public Enumeration<String> getAttributesNames()
java.lang.String
.public String getAttributeName(int i)
i
.i
- The index of the attribute.public Enumeration<Class<?>> getAttributesClasses()
java.lang.Class
public Class<?> getAttributeClass(int i)
i
.i
- The index of the attributepublic boolean isNullable(int i)
i
can have a null value.i
- The index of the attribute.public int getAttributesCount()
public int getAttributeIndex(String name)
name
- The name of the attribute.IllegalArgumentException
- If the name does not correspond to an
existing attribute name.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.