|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.lapetus_ltd._2009.xml.types.XLptsODBCDriverType
com.lapetus_ltd.api.db.xml.types.TLptsODBCDriverType
public class TLptsODBCDriverType
Class Description :
Field Summary |
---|
Fields inherited from class com.lapetus_ltd._2009.xml.types.XLptsODBCDriverType |
---|
driverListItem, osName |
Constructor Summary | |
---|---|
TLptsODBCDriverType()
This constructor initiates the OsName and the driver list. |
|
TLptsODBCDriverType(XLptsODBCDriverType systemDriverType)
This constructor copies the driver information from an XLptsODBCDriverType. |
Method Summary | |
---|---|
void |
addDriverListItem(XLptsDriverExtensionSubType dest)
Adds the driver extension sub type to the driver list. |
boolean |
equals(java.lang.Object obj)
Check for equal TLptsODBCDriverType objects. |
java.util.List<XLptsDriverExtensionSubType> |
getDriverListItem()
Returns a copy of the actual list. |
int |
getDriverListItemSize()
Returns the size of the actual list. |
void |
removeDriverListItem(XLptsDriverExtensionSubType dest)
Removes the driver extension sub type from the driver extension list. |
Methods inherited from class com.lapetus_ltd._2009.xml.types.XLptsODBCDriverType |
---|
getOsName, setOsName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TLptsODBCDriverType()
This constructor initiates the OsName and the driver list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. Notes : Default Constructor set OsName to empty string and initialize the driver list.//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 TLptsODBCDriverType(XLptsODBCDriverType systemDriverType)
This constructor copies the driver information from an XLptsODBCDriverType.
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 XLptsODBCDriverType 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); 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);
systemDriverType
- the class object to copy.Method Detail |
---|
public void addDriverListItem(XLptsDriverExtensionSubType dest)
Adds the driver extension sub type to the driver list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to add to the list. Getting the list with getDriverListItem and//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); if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItemSize()>0) { if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItem().contains(dest)) ((TLptsODBCDriverType) projectSettings.getOsDriver()).removeDriverListItem(dest); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest); }
dest
- the driver extension sub type to add in the list.public boolean equals(java.lang.Object obj)
Check for equal TLptsODBCDriverType objects.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to compare two TLptsODBCDriverType objects by there osName. Example :
equals
in class java.lang.Object
obj
- the odbc driver type
public java.util.List<XLptsDriverExtensionSubType> getDriverListItem()
Returns a copy of the actual list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not add to this list as there is no result. Use the addDriverListItem function. Example ://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); if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItemSize()>0) { if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItem().contains(dest)) ((TLptsODBCDriverType) projectSettings.getOsDriver()).removeDriverListItem(dest); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest); }
getDriverListItem
in class XLptsODBCDriverType
public int getDriverListItemSize()
Returns the size of the actual list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : Never. The result may be an empty list. Notes : Do not use getDriverListItem().size() as it is not efficient. Example ://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); if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItemSize()>0) { if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItem().contains(dest)) ((TLptsODBCDriverType) projectSettings.getOsDriver()).removeDriverListItem(dest); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest); }
public void removeDriverListItem(XLptsDriverExtensionSubType dest)
Removes the driver extension sub type from the driver extension list.
Thread Safe : Yes Spawns its own Thread : No May Return NULL : n/a Notes : Use this to remove from the list. Getting the list with getDriverListItem and//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); if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItemSize()>0) { if(((TLptsODBCDriverType) projectSettings.getOsDriver()).getDriverListItem().contains(dest)) ((TLptsODBCDriverType) projectSettings.getOsDriver()).removeDriverListItem(dest); //Finally add driver extension sub type to the list ((TLptsODBCDriverType) projectSettings.getOsDriver()).addDriverListItem(dest); }
dest
- the driver extension sub type to remove from list.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |