use of org.apache.derby.iapi.services.io.FormatableHashtable in project derby by apache.
the class BasicProviderInfo method writeExternal.
/**
* Write this object to a stream of stored objects.
*
* @param out write bytes here.
*
* @exception IOException thrown on error
*/
public void writeExternal(ObjectOutput out) throws IOException {
FormatableHashtable fh = new FormatableHashtable();
fh.put("uuid", uuid);
fh.put("dFinder", dFinder);
fh.put("providerName", providerName);
out.writeObject(fh);
}
use of org.apache.derby.iapi.services.io.FormatableHashtable in project derby by apache.
the class ColumnInfo method readExternal.
// Formatable methods
/**
* Read this object from a stream of stored objects.
*
* @param in read this.
*
* @exception IOException thrown on error
* @exception ClassNotFoundException thrown on error
*/
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
FormatableLongHolder flh;
FormatableHashtable fh = (FormatableHashtable) in.readObject();
name = (String) fh.get("name");
dataType = (DataTypeDescriptor) fh.get("dataType");
defaultValue = (DataValueDescriptor) fh.get("defaultValue");
defaultInfo = (DefaultInfo) fh.get("defaultInfo");
newDefaultUUID = (UUID) fh.get("newDefaultUUID");
oldDefaultUUID = (UUID) fh.get("oldDefaultUUID");
action = fh.getInt("action");
if (fh.get("autoincStart") != null) {
autoincStart = fh.getLong("autoincStart");
autoincInc = fh.getLong("autoincInc");
} else {
autoincInc = autoincStart = 0;
}
FormatableArrayHolder fah = (FormatableArrayHolder) fh.get("providers");
if (fah != null) {
providers = fah.getArray(ProviderInfo[].class);
}
}
use of org.apache.derby.iapi.services.io.FormatableHashtable in project derby by apache.
the class StatisticsImpl method readExternal.
/*------------------ Externalizable Interface ------------------*/
/**
* @see java.io.Externalizable#readExternal
*/
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
FormatableHashtable fh = (FormatableHashtable) in.readObject();
numRows = fh.getLong("numRows");
numUnique = fh.getLong("numUnique");
}
use of org.apache.derby.iapi.services.io.FormatableHashtable in project derby by apache.
the class StatisticsImpl method writeExternal.
/**
* Write this object to a stream of stored objects.
*
* @param out write bytes here.
*
* @exception IOException thrown on error
*/
public void writeExternal(ObjectOutput out) throws IOException {
FormatableHashtable fh = new FormatableHashtable();
fh.putLong("numRows", numRows);
fh.putLong("numUnique", numUnique);
out.writeObject(fh);
}
use of org.apache.derby.iapi.services.io.FormatableHashtable in project derby by apache.
the class IndexDescriptorImpl method readExternal.
/* Externalizable interface */
/**
* @see java.io.Externalizable#readExternal
*
* @exception IOException Thrown on read error
*/
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
FormatableHashtable fh = (FormatableHashtable) in.readObject();
isUnique = fh.getBoolean("isUnique");
int bcpLength = fh.getInt("keyLength");
baseColumnPositions = new int[bcpLength];
isAscending = new boolean[bcpLength];
for (int i = 0; i < bcpLength; i++) {
baseColumnPositions[i] = fh.getInt("bcp" + i);
isAscending[i] = fh.getBoolean("isAsc" + i);
}
numberOfOrderedColumns = fh.getInt("orderedColumns");
indexType = (String) fh.get("indexType");
// was created in older versions
if (fh.containsKey("isUniqueWithDuplicateNulls"))
isUniqueWithDuplicateNulls = fh.getBoolean("isUniqueWithDuplicateNulls");
else
isUniqueWithDuplicateNulls = false;
// was created in old versions (< 10_11).
if (fh.containsKey("hasDeferrableChecking")) {
hasDeferrableChecking = fh.getBoolean("hasDeferrableChecking");
} else {
hasDeferrableChecking = false;
}
// was created in old versions (< 10_11).
if (fh.containsKey("isUniqueDeferrable")) {
isUniqueDeferrable = fh.getBoolean("isUniqueDeferrable");
} else {
isUniqueDeferrable = false;
}
}
Aggregations