Package org.apache.derby.iapi.services.io

Examples of org.apache.derby.iapi.services.io.FormatableHashtable


   * @exception ClassNotFoundException    thrown on error
   */
  public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException
  {
    FormatableHashtable fh = (FormatableHashtable)in.readObject();   
    name = (String)fh.get("name");
    tableName = (String)fh.get("tableName");
    schemaName = (String)fh.get("schemaName");
    columnPos = fh.getInt("columnPos");
    type = (DataTypeDescriptor)fh.get("type");
    isAutoincrement = fh.getBoolean("isAutoincrement");
    updatableByCursor = fh.getBoolean("updatableByCursor");
  }
View Full Code Here


   */
  public void readExternal( ObjectInput in )
     throws IOException, ClassNotFoundException
  {

    FormatableHashtable fh = (FormatableHashtable)in.readObject();
    uuid = (UUID)fh.get("uuid");
    dFinder = (DependableFinder)fh.get("dFinder");
    providerName = (String) fh.get("providerName");
  }
View Full Code 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);
  }
View Full Code Here

   *
    * @exception IOException thrown on error
   */
  public void writeExternal(ObjectOutput out) throws IOException
  {
    FormatableHashtable fh = new FormatableHashtable();
    fh.put("name", name);
    fh.put("tableName", tableName);
    fh.put("schemaName", schemaName);
    fh.putInt("columnPos", columnPos);
    fh.put("type", type);
    fh.putBoolean("isAutoincrement", isAutoincrement);
    fh.putBoolean("updatableByCursor", updatableByCursor);
    out.writeObject(fh);
    return;
 
View Full Code Here

   * @exception ClassNotFoundException    thrown on error
   */
  public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException
  {
    FormatableHashtable fh = (FormatableHashtable)in.readObject();   
    name = (String)fh.get("name");
    tableName = (String)fh.get("tableName");
    schemaName = (String)fh.get("schemaName");
    columnPos = fh.getInt("columnPos");
    type = getStoredDataTypeDescriptor(fh.get("type"));
    isAutoincrement = fh.getBoolean("isAutoincrement");
    updatableByCursor = fh.getBoolean("updatableByCursor");
  }
View Full Code Here

   *
   * @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");
    //isUniqueWithDuplicateNulls attribute won't be present if the index
    //was created in older versions 
    if (fh.containsKey("isUniqueWithDuplicateNulls"))
      isUniqueWithDuplicateNulls = fh.getBoolean(
                                    "isUniqueWithDuplicateNulls");
    else
      isUniqueWithDuplicateNulls = false;

        // hasDeferrableChecking won't be present if the index
        // was created in old versions (< 10_11).
        if (fh.containsKey("hasDeferrableChecking")) {
            hasDeferrableChecking = fh.getBoolean("hasDeferrableChecking");
        } else {
            hasDeferrableChecking = false;
        }

        // isUniqueDeferrable won't be present if the index
        // was created in old versions (< 10_11).
        if (fh.containsKey("isUniqueDeferrable")) {
            isUniqueDeferrable = fh.getBoolean("isUniqueDeferrable");
        } else {
            isUniqueDeferrable = false;
        }
  }
View Full Code Here

   *
   * @exception IOException  Thrown on write error
   */
  public void writeExternal(ObjectOutput out) throws IOException
  {
    FormatableHashtable fh = new FormatableHashtable();
    fh.putBoolean("isUnique", isUnique);
    fh.putInt("keyLength", baseColumnPositions.length);
    for (int i = 0; i < baseColumnPositions.length; i++)
    {
      fh.putInt("bcp" + i, baseColumnPositions[i]);
      fh.putBoolean("isAsc" + i, isAscending[i]);
    }
    fh.putInt("orderedColumns", numberOfOrderedColumns);
    fh.put("indexType", indexType);
    //write the new attribut older versions will simply ignore it
    fh.putBoolean("isUniqueWithDuplicateNulls",
                                        isUniqueWithDuplicateNulls);
        fh.putBoolean("hasDeferrableChecking", hasDeferrableChecking);
        fh.putBoolean("isUniqueDeferrable", isUniqueDeferrable);
        out.writeObject(fh);
  }
View Full Code Here

     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);
        }
  }
View Full Code Here

   * @exception IOException    thrown on error
   */
  public void writeExternal( ObjectOutput out )
     throws IOException
  {
    FormatableHashtable fh = new FormatableHashtable();
    fh.put("name", name);
    fh.put("dataType", dataType);
    fh.put("defaultValue", defaultValue);
    fh.put("defaultInfo", defaultInfo);
    fh.put("newDefaultUUID", newDefaultUUID);
    fh.put("oldDefaultUUID", oldDefaultUUID );
    fh.putInt("action", action);
   
    if (autoincInc != 0)
    {
      // only write out autoinc values if its an autoinc column.
      fh.putLong("autoincStart", autoincStart);
      fh.putLong("autoincInc", autoincInc);
    }

        if ( providers != null )
        {
            FormatableArrayHolder   fah = new FormatableArrayHolder( providers );
            fh.put( "providers", fah );
        }
       
    out.writeObject(fh);
  }
View Full Code Here

   */
  public void readExternal( ObjectInput in )
      throws IOException, ClassNotFoundException
  {
    super.readExternal(in);
    FormatableHashtable fh = (FormatableHashtable)in.readObject();
    columnBitMap = (byte[])fh.get("columnBitMap");
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.services.io.FormatableHashtable

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.