|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsDriverExtensionSubType
com.lapetus_ltd.api.db.xml.types.TLptsDriverExtensionSubType
public class TLptsDriverExtensionSubType
Class Description : This class holds the ODBC name of the driver and extension of the supported file.
This is the wrapper class for the XLptsDriverExtensionSubType.
This class is used by the driver extension class for dealing with ODBC drivers.
Each instance of this class holds the name of the ODBC driver in Windows and one extension file that is supported.
We can have many instantiations with the same driver name and different supported extensions.
These items are stored in a list under the TLptsODBCDriverType
, which is again is a list under TLptsDriverExtensionType
.
$LastChangedRevision: 1190 $
$LastChangedDate:: 2010-11-17 13:21:35#$
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsDriverExtensionSubType |
---|
driverName, extension |
Constructor Summary | |
---|---|
TLptsDriverExtensionSubType()
Creates a new blank XLptsDriverExtensionSubType with all fields set to empty strings. |
|
TLptsDriverExtensionSubType(XLptsDriverExtensionSubType dest)
Creates a new XLptsDriverExtensionSubType from another. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Check for equal TLptsDriverExtensionSubType objects. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsDriverExtensionSubType |
---|
getDriverName, getExtension, setDriverName, setExtension |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsDriverExtensionSubType()
Creates a new blank XLptsDriverExtensionSubType with all fields set to empty strings.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Default Constructor set driverName and extension to empty strings.//Load a projectType from XML file XLptsDBProjectType projectType = (XLptsDBProjectType) TLptsXmlUtil.unmarshal(selectedFile,XLptsDBProjectType.class); //Now we want to create a new TLptsDBProjectType from the XLptsDBProjectType. Also we want to add a new Driver Extension Sub Type TLptsDBProjectType projectSettings = new TLptsDBProjectType(projectType); TLptsDriverExtensionSubType dest = new TLptsDriverExtensionSubType(); dest.setDriverName("Microsoft Access Driver (*.mdb, *.accdb)"); dest.setExtension("mdb"); //Or load from a file //XLptsDriverExtensionSubType xdest = (XLptsDriverExtensionSubType) TLptsXmlUtil.unmarshal(selectedFile,XLptsDriverExtensionSubType.class); //TLptsDriverExtensionSubType dest = new TLptsDriverExtensionSubType(xdest); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest);
public TLptsDriverExtensionSubType(XLptsDriverExtensionSubType dest)
Creates a new XLptsDriverExtensionSubType from another.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Use this function every time you need to copy or instantiate a type XLptsDriverExtensionSubType class.//Load a projectType from XML file XLptsDBProjectType projectType = (XLptsDBProjectType) TLptsXmlUtil.unmarshal(selectedFile,XLptsDBProjectType.class); //Now we want to create a new TLptsDBProjectType from the XLptsDBProjectType. Also we want to add a new Driver Extension Sub Type TLptsDBProjectType projectSettings = new TLptsDBProjectType(projectType); //Load from a file XLptsDriverExtensionSubType xdest = (XLptsDriverExtensionSubType) TLptsXmlUtil.unmarshal(selectedFile,XLptsDriverExtensionSubType.class); TLptsDriverExtensionSubType dest = new TLptsDriverExtensionSubType(xdest); //Or Create your own //TLptsDriverExtensionSubType dest = new TLptsDriverExtensionSubType(); //dest.setDriverName("Microsoft Access Driver (*.mdb, *.accdb)"); //dest.setExtension("mdb"); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest);
dest
- the class object to copy.Method Detail |
---|
public boolean equals(java.lang.Object obj)
Check for equal TLptsDriverExtensionSubType objects.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to compare two TLptsDriverExtensionSubType objects by there driverName and there extension. Example :TLptsDriverExtensionSubType dest1 = new TLptsDriverExtensionSubType(); dest1.setDriverName("driver") dest1.setExtension("dr") TLptsDriverExtensionSubType dest2 = new TLptsDriverExtensionSubType(); dest1.setDriverName("driver") dest1.setExtension("dR") return dest1.equals(dest2); Result : true because at compare ignores Case Sensitive
equals
in class java.lang.Object
obj
- the driver extension sub type
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |