|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jcrontab.data.GenericSQLSource
This class is only a generic example and doesn't aim to solve all the needs for the differents system's. if you want to make this class to fit your needs feel free to do it and remember the license. On of the things this class does is to open a connection to the database , this is nasty and very expensive, y you want to integrate jcrontab with a pool like poolman or jboss it's quite easy, should substitute connection logic with particular one.
Field Summary | |
static String |
nextSequence
This Query finds the next value in the sequence |
static String |
queryAll
This Query gets all the Crontab entries from the events table |
static String |
queryRemoving
This Query removes the given Crontab Entries |
static String |
querySearching
This Query gets all the Crontab entries from the events table but searching by the name |
static String |
queryStoring
This Query stores the Crontab entries |
Constructor Summary | |
protected |
GenericSQLSource()
Creates new GenericSQLSource |
Method Summary | |
CrontabEntryBean |
find(CrontabEntryBean ceb)
This method searches the Crontab Entry that the class has the given name |
CrontabEntryBean[] |
findAll()
This method searches all the CrontabEntries from the DataSource |
protected Connection |
getConnection()
Retrieves a connection to the database. |
DataSource |
getInstance()
This method grants this class to be a singleton and grants data access integrity |
protected Object |
loadDatabaseDriver(String srcName)
Initializes the database engine/data source. |
void |
remove(CrontabEntryBean[] beans)
This method removes the given Crontab Entries |
void |
store(CrontabEntryBean bean)
This method saves the CrontabEntryBean the actual problem with this method is that doesn't store comments and blank lines from the original file any ideas? |
void |
store(CrontabEntryBean[] beans)
This method saves the CrontabEntryBean the actual problem with this method is that doesn't store comments and blank lines from the original file any ideas? |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static String queryAll
public static String querySearching
public static String queryStoring
public static String queryRemoving
public static String nextSequence
Constructor Detail |
protected GenericSQLSource()
Method Detail |
public DataSource getInstance()
getInstance
in interface DataSource
public CrontabEntryBean find(CrontabEntryBean ceb) throws CrontabEntryException, ClassNotFoundException, SQLException, DataNotFoundException
find
in interface DataSource
CrontabEntryException
- when it can't parse the line correctly
ClassNotFoundException
- cause loading the driver can throw an
ClassNotFoundException
SQLException
- Yep can throw an SQLException too
DataNotFoundException
public CrontabEntryBean[] findAll() throws CrontabEntryException, ClassNotFoundException, SQLException, DataNotFoundException
findAll
in interface DataSource
CrontabEntryException
- when it can't parse the line correctly
ClassNotFoundException
- cause loading the driver can throw an
ClassNotFoundException
SQLException
- Yep can throw an SQLException too
DataNotFoundException
public void remove(CrontabEntryBean[] beans) throws CrontabEntryException, ClassNotFoundException, SQLException
remove
in interface DataSource
CrontabEntryException
- when it can't parse the line correctly
ClassNotFoundException
- cause loading the driver can throw an
ClassNotFoundException
SQLException
- Yep can throw an SQLException toopublic void store(CrontabEntryBean[] beans) throws CrontabEntryException, ClassNotFoundException, SQLException
store
in interface DataSource
CrontabEntryException
- when it can't parse the line correctly
ClassNotFoundException
- cause loading the driver can throw an
ClassNotFoundException
SQLException
- Yep can throw an SQLException toopublic void store(CrontabEntryBean bean) throws CrontabEntryException, ClassNotFoundException, SQLException
store
in interface DataSource
CrontabEntryException
- when it can't parse the line correctly
ClassNotFoundException
- cause loading the driver can throw an
ClassNotFoundException
SQLException
- Yep can throw an SQLException tooprotected Connection getConnection() throws SQLException
Connection
SQLException
- if there is an error retrieving the Connection.protected Object loadDatabaseDriver(String srcName) throws SQLException
srcName
- is the JDBC DataSource name or null to load the driver.
SQLExcption
- if there is no valid driver.
SQLException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |