org.apache.ojb.broker.metadata
Class FieldTypeClasses.ArrayFieldType

java.lang.Object
  extended byorg.apache.ojb.broker.metadata.FieldTypeClasses.BaseFieldType
      extended byorg.apache.ojb.broker.metadata.FieldTypeClasses.ImmutableFieldType
          extended byorg.apache.ojb.broker.metadata.FieldTypeClasses.ArrayFieldType
All Implemented Interfaces:
FieldType, java.io.Serializable
Enclosing class:
org.apache.ojb.broker.metadata.FieldTypeClasses

public static class FieldTypeClasses.ArrayFieldType
extends org.apache.ojb.broker.metadata.FieldTypeClasses.ImmutableFieldType

Array fields are logical pointer to DB, so for OJB it's immutable. Snip of JDBC specification: "The Array object returned to an application by the ResultSet.getArray and CallableStatement.getArray methods is a logical pointer to the SQL ARRAY value in the database; it does not contain the contents of the SQL ARRAY value."

See Also:
Serialized Form

Constructor Summary
FieldTypeClasses.ArrayFieldType()
           
 
Method Summary
 java.lang.Object copy(java.lang.Object source)
          Returns a copy of the specified persistent class field (e.g.
 boolean equals(java.lang.Object firstValue, java.lang.Object secondValue)
          Returns true if the field value hasn't changed.
 int getSqlType()
          Returns the sql Types of this field.
 boolean isMutable()
          Returns true if the field type is mutable, e.g.
 void setSqlType(JdbcType jdbcType)
          Dets the associated sql field type of this field.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldTypeClasses.ArrayFieldType

public FieldTypeClasses.ArrayFieldType()
Method Detail

isMutable

public boolean isMutable()
Description copied from interface: FieldType
Returns true if the field type is mutable, e.g. a jdbc BLOB field or jdbc TIMESTAMP field.

Returns:

copy

public java.lang.Object copy(java.lang.Object source)
Description copied from interface: FieldType
Returns a copy of the specified persistent class field (e.g. Long, Integer,...).
NOTE: The specified field value

Parameters:
source - The field to copy.
Returns:
A copy of the field or the same instance if copying is not possible. Depends on the implementation.

equals

public boolean equals(java.lang.Object firstValue,
                      java.lang.Object secondValue)
Description copied from interface: FieldType
Returns true if the field value hasn't changed.

Parameters:
firstValue - A field value object.
secondValue - A field value object.
Returns:
true if the field value hasn't changed.

setSqlType

public void setSqlType(JdbcType jdbcType)
Description copied from interface: FieldType
Dets the associated sql field type of this field.

Specified by:
setSqlType in interface FieldType
Parameters:
jdbcType - The associated JdbcType.

getSqlType

public int getSqlType()
Description copied from interface: FieldType
Returns the sql Types of this field.

Specified by:
getSqlType in interface FieldType

toString

public java.lang.String toString()


(C) 2002 - 2004 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.3, 2005-04-2