org.apache.derby.catalog.types
Class DefaultInfoImpl

java.lang.Object
  extended byorg.apache.derby.catalog.types.DefaultInfoImpl
All Implemented Interfaces:
DefaultInfo, java.io.Externalizable, Formatable, java.io.Serializable, TypedFormat

public class DefaultInfoImpl
extends java.lang.Object
implements DefaultInfo, Formatable

See Also:
Serialized Form

Field Summary
private  java.lang.String defaultText
           
private  DataValueDescriptor defaultValue
          This class implements Formatable.
private  ProviderInfo[] providerInfo
           
 
Constructor Summary
DefaultInfoImpl()
          Public niladic constructor.
DefaultInfoImpl(java.lang.String defaultText, DataValueDescriptor defaultValue)
          Constructor for use with numeric types
 
Method Summary
 java.lang.String getDefaultText()
          Get the text of a default.
 DataValueDescriptor getDefaultValue()
          Get the default value.
 ProviderInfo[] getProviderInfo()
          Get the ProviderInfo.
 int getTypeFormatId()
          Get the formatID which corresponds to this class.
 void readExternal(java.io.ObjectInput in)
          Read this object from a stream of stored objects.
 void setDefaultValue(DataValueDescriptor defaultValue)
          Set the default value.
 void setProviderInfo(ProviderInfo[] providerInfo)
          Set the ProviderInfo.
 java.lang.String toString()
           
 void writeExternal(java.io.ObjectOutput out)
          Write this object to a stream of stored objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultValue

private DataValueDescriptor defaultValue
This class implements Formatable. That means that it can write itself to and from a formatted stream. If you add more fields to this class, make sure that you also write/read them with the writeExternal()/readExternal() methods. If, inbetween releases, you add more fields to this class, then you should bump the version number emitted by the getTypeFormatId() method.


defaultText

private java.lang.String defaultText

providerInfo

private ProviderInfo[] providerInfo
Constructor Detail

DefaultInfoImpl

public DefaultInfoImpl()
Public niladic constructor. Needed for Formatable interface to work.


DefaultInfoImpl

public DefaultInfoImpl(java.lang.String defaultText,
                       DataValueDescriptor defaultValue)
Constructor for use with numeric types

Parameters:
defaultText - The text of the default.
Method Detail

getDefaultText

public java.lang.String getDefaultText()
Description copied from interface: DefaultInfo
Get the text of a default.

Specified by:
getDefaultText in interface DefaultInfo
Returns:
The text of the default.
See Also:
DefaultInfo.getDefaultText()

toString

public java.lang.String toString()

readExternal

public void readExternal(java.io.ObjectInput in)
                  throws java.io.IOException,
                         java.lang.ClassNotFoundException
Read this object from a stream of stored objects.

Specified by:
readExternal in interface java.io.Externalizable
Parameters:
in - read this.
Throws:
java.io.IOException - thrown on error
java.lang.ClassNotFoundException - thrown on error

writeExternal

public void writeExternal(java.io.ObjectOutput out)
                   throws java.io.IOException
Write this object to a stream of stored objects.

Specified by:
writeExternal in interface java.io.Externalizable
Parameters:
out - write bytes here.
Throws:
java.io.IOException - thrown on error

getTypeFormatId

public int getTypeFormatId()
Get the formatID which corresponds to this class.

Specified by:
getTypeFormatId in interface TypedFormat
Returns:
the formatID of this class

getDefaultValue

public DataValueDescriptor getDefaultValue()
Get the default value. (NOTE: This returns null if the default is not a constant.)

Returns:
The default value.

setDefaultValue

public void setDefaultValue(DataValueDescriptor defaultValue)
Set the default value.

Parameters:
defaultValue - The default value.
Returns:
Nothing.

setProviderInfo

public void setProviderInfo(ProviderInfo[] providerInfo)
Set the ProviderInfo. (Providers that default is dependent on.)

Parameters:
providerInfo - Providers that default is dependent on.
Returns:
Nothing.

getProviderInfo

public ProviderInfo[] getProviderInfo()
Get the ProviderInfo. (Providers that default is dependent on.)

Returns:
Providers that default is dependent on.


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.