public class ProposalSql extends AbstractSql
CREATE TABLE "proposal" ( propid | character varying(255) | not null pi | character varying(255) | title | character varying(255) | abstract | text | expire | interval |In this setup, the columns have the following meanings:
TaskSql table.UserSql user-id.#KEY_INITIALEXPIRE.
| Modifier and Type | Class and Description |
|---|---|
static class |
ProposalSql.AddProposal
Adds a new user with the command line.
|
static class |
ProposalSql.GetTime |
AbstractSql.Columns, AbstractSql.ExtractPropertyResources.Load, PropertyResources.URLResource| Modifier and Type | Field and Description |
|---|---|
private static String |
DEFABSTRACTFIELD
The key to the object name in the database.
|
private static String |
DEFDONEDURATION |
private static String |
DEFDONEOBJECT |
private static String |
DEFDONESUCCESS |
private static String |
DEFDONETABLE |
private static String |
DEFEXPIREFIELD
The key to the object name in the database.
|
private static String |
DEFPIFIELD
The key to the object name in the database.
|
private static String |
DEFPROPIDFIELD
The key to the object name in the database.
|
private static int |
DEFPROPRIETY
The key to the default propriety period if none given.
|
static String |
DEFTABLE
The default table name.
|
private static String |
DEFTASKOBJECT |
private static String |
DEFTASKPROPID |
private static String |
DEFTASKTABLE |
private static String |
DEFTIMEUNIT
The key to the propriety period time unit .
|
private static String |
DEFTITLEFIELD
The key to the object name in the database.
|
static String |
KEY_ABSTRACTFIELD
The key to the object name in the database.
|
static String |
KEY_DONEDURATION |
static String |
KEY_DONEOBJECT |
static String |
KEY_DONESUCCESS |
static String |
KEY_DONETABLE |
static String |
KEY_EXPIREFIELD
The key to the object name in the database.
|
static String |
KEY_PIFIELD
The key to the object name in the database.
|
static String |
KEY_PROPIDFIELD
The key to the object name in the database.
|
static String |
KEY_PROPRIETY
The key to the default propriety period if none given.
|
static String |
KEY_TASKOBJECT |
static String |
KEY_TASKPROPID |
static String |
KEY_TASKTABLE |
static String |
KEY_TIMEUNIT
The key to the propriety period time unit .
|
static String |
KEY_TITLEFIELD
The key to the object name in the database.
|
KEY_TABLE, SQLBATCHDIR, SQLFAILDIRKEY_NOINITONCREATE, POSTFIX_ALPHABET, POSTFIX_BYTES, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_MODTIME, POSTFIX_URLKEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATORKEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOMECONFIG, KEY_CLASS| Constructor and Description |
|---|
ProposalSql(Map<String,String> prop)
Constructs a new proposal sql.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addProposal(String id,
String user,
String title,
String abstr)
Adds a new proposal with a unique ID to the db.
|
boolean |
addProposal(String id,
String user,
String title,
String abstr,
int period)
Adds a new proposal with a unique ID to the db.
|
List<String> |
getAllProposalIds()
Gets all proposal ids.
|
Map<String,Object> |
getProposal(String propid)
Returns the mapping of field names to db entries for the given proposal
or null if no such entry exists.
|
long |
getTimeForProposal(String propid,
boolean onlysuccess)
Gets the ms spent on this proposal, if onlysuccess id true, then only
successful proposals are counted.
|
delete, distinct, distinct, exit, getAccess, getDefaultArchive, getDefaultFormat, getTable, init, insert, isEntry, release, release, replace, retrieve, retrieve, retrieve, single, singleclone, createFrom, createFrom, createFrom, createInstance, getApplet, getAsResources, getLocate, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, hasLocalURLs, initProperties, keyCreate, keyCreate, reload, setAppletaugment, augment, augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, parseObject, reload, removeProperty, requires, rescanned, setObject, setProperties, setProperty, stringProperties, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdefaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringPropertiespublic static final String KEY_PROPIDFIELD
public static final String KEY_PIFIELD
public static final String KEY_TITLEFIELD
public static final String KEY_ABSTRACTFIELD
public static final String KEY_EXPIREFIELD
public static final String KEY_PROPRIETY
public static final String KEY_TIMEUNIT
public static final String KEY_TASKOBJECT
public static final String KEY_DONEOBJECT
public static final String KEY_TASKPROPID
public static final String KEY_DONESUCCESS
public static final String KEY_DONEDURATION
public static final String KEY_DONETABLE
public static final String KEY_TASKTABLE
public static final String DEFTABLE
private static final String DEFPROPIDFIELD
private static final String DEFPIFIELD
private static final String DEFTITLEFIELD
private static final String DEFABSTRACTFIELD
private static final String DEFEXPIREFIELD
private static final int DEFPROPRIETY
private static final String DEFTIMEUNIT
private static final String DEFTASKOBJECT
private static final String DEFDONEOBJECT
private static final String DEFTASKPROPID
private static final String DEFDONESUCCESS
private static final String DEFDONEDURATION
private static final String DEFDONETABLE
private static final String DEFTASKTABLE
public Map<String,Object> getProposal(String propid)
public boolean addProposal(String id, String user, String title, String abstr)
public boolean addProposal(String id, String user, String title, String abstr, int period)
#KEY_TIMEUNITS, normally years.public long getTimeForProposal(String propid, boolean onlysuccess)
select sum(duration) from done,task where success='t' and task.object=done.objid
and propid='propid'