Class StandardDBFieldMap

java.lang.Object
overit.geocall.sql.StandardDBFieldMap
All Implemented Interfaces:
Serializable, DBFieldMap

public class StandardDBFieldMap extends Object implements DBFieldMap, Serializable
The class defines the StandardDBFieldMap, the standard map between the fields of a table in memory and a server database table. It is created starting from a PropertyGetter.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Properties
    Properties map that stores the associations between the field names in memory and the fields name on the database
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a StandardDBFieldMap starting from a properties file
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the name of the virtual field name in memory starting from the name of the field of the same table in the server database
    Returns the name of the server database table field starting from a virtual field name of the same table in memory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _p

      protected Properties _p
      Properties map that stores the associations between the field names in memory and the fields name on the database
  • Constructor Details

    • StandardDBFieldMap

      public StandardDBFieldMap(String strClass, Class c) throws IOException
      Creates a StandardDBFieldMap starting from a properties file
      Parameters:
      strClass - Name of the Java resource with the properties
      c - Caller's Java class. Used to choose the right ClassLoader
      Throws:
      IOException - The readoing of a properties file can raise an IOException
  • Method Details

    • getDBColumnName

      public String getDBColumnName(String name)
      Returns the name of the server database table field starting from a virtual field name of the same table in memory
      Specified by:
      getDBColumnName in interface DBFieldMap
      Parameters:
      name - Name of the field of the table in memory
      Returns:
      Name of the field of the server database table
    • getColumnName

      public String getColumnName(String dbname)
      Returns the name of the virtual field name in memory starting from the name of the field of the same table in the server database
      Specified by:
      getColumnName in interface DBFieldMap
      Parameters:
      dbname - Name of the field of the server database table
      Returns:
      Name of the field of the table in memory