|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
mysql.AbstractSql
mysql.ProposalSql
public class ProposalSql
A class that allows access to a database containing the propsals to stella observations as handed over by the user. It links observing programs to users.
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Field Summary | |
|---|---|
private static String |
DEFABSTRACTFIELD
The key to the object name in the database. |
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. |
private static String |
DEFTABLE
The default table name. |
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_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_TIMEUNIT
The key to the propriety period time unit . |
static String |
KEY_TITLEFIELD
The key to the object name in the database. |
| Fields inherited from class mysql.AbstractSql |
|---|
KEY_TABLE |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
ProposalSql(Map<String,String> prop)
Constructs a new proposal sql. |
|
| Method Summary | |
|---|---|
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. |
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. |
| Methods inherited from class mysql.AbstractSql |
|---|
getPassword, getTable, getUserName, init, isEntry |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
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, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, 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, stringProperties |
| Field Detail |
|---|
public 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
private 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
| Constructor Detail |
|---|
public ProposalSql(Map<String,String> prop)
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||