|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elexis.data.PersistentObject
ch.marlovits.firstnames.MarlovitsFirstname
public class MarlovitsFirstname
class for saving data into and getting data from the db table
ch_marlovits_firstames. The table contains firstname-gender pairs. The
firstnames are all saved lowercase. The gender can be one of 'm' for male,
'w' for female or 'b' 'for both genders possible'.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ch.elexis.data.PersistentObject |
---|
PersistentObject.FieldType |
Field Summary | |
---|---|
static int |
FEMALE
|
static java.lang.String |
FEMALE_STR
|
static java.lang.String |
FLD_DELETED
|
static java.lang.String |
FLD_FIRSTNAME
|
static java.lang.String |
FLD_ID
|
static java.lang.String |
FLD_SEX
|
static java.lang.String |
FLD_TYPE
|
static java.lang.String |
FLDTYPE_IMPORTED
|
static java.lang.String |
FLDTYPE_USERRECORD
|
static int |
GENDERUNDEFINED
|
static java.lang.String |
GENDERUNDEFINED_STR
|
static int |
MALE
|
static java.lang.String |
MALE_STR
|
static java.lang.String |
MARLOVITS_FIRSTNAME_FEMALE
|
static java.lang.String |
MARLOVITS_FIRSTNAME_MALE
|
static java.lang.String |
MARLOVITS_FIRSTNAME_SEXES_STR
|
static int |
UNISEX
|
static java.lang.String |
UNISEX_STR
|
static java.lang.String |
VERSION
|
Fields inherited from class ch.elexis.data.PersistentObject |
---|
CACHE_DEFAULT_LIFETIME, CACHE_MIN_LIFETIME, CFG_CONNECTSTRING, CFG_DRIVER, CFG_PWD, CFG_TYPE, CFG_USER, DELETED, EXISTS, INEXISTENT, INVALID_ID, MATCH_AUTO, MATCH_CONTAINS, MATCH_EXACT, MATCH_REGEXP, MATCH_START |
Fields inherited from interface ch.elexis.util.IGenderService |
---|
dbFemaleString, dbMaleString, FIRSTNAME_SEXES_STR |
Fields inherited from interface ch.elexis.core.data.IPersistentObject |
---|
FLD_DATE, FLD_EXTINFO, FLD_LASTUPDATE, STATE_EXISTING, STATE_INEXISTENT, STATE_INVALID_ID |
Constructor Summary | |
---|---|
MarlovitsFirstname()
|
|
MarlovitsFirstname(java.lang.String id)
Constructor: creates a new entry in the db, just with the ID. if there is already an entry with this id, then just load this entry |
|
MarlovitsFirstname(java.lang.String firstname,
java.lang.String sex)
The constructor for Firstname. |
|
MarlovitsFirstname(java.lang.String id,
java.lang.String firstname,
java.lang.String sex,
boolean userRecord)
The constructor for Firstname. |
Method Summary | |
---|---|
static java.lang.Boolean |
_addFirstname(java.lang.String firstname,
java.lang.String sex)
Adds a first name to the table. |
static java.lang.Boolean |
_addFirstname(java.lang.String firstname,
java.lang.String sex,
boolean userRecord)
Adds a first name to the table. |
static void |
_deleteFirstname(java.lang.String firstname,
boolean userRecord)
|
static int |
_getGender(java.lang.String firstname)
return the gender of the first name for param firstname. |
static int |
_getGender(java.lang.String firstname,
boolean userRecord)
return the gender of the first name for param firstname. |
static java.lang.String |
_getGenderString(java.lang.String firstname)
Return the gender of the first name for param firstname. |
static java.lang.String |
_getGenderString(java.lang.String firstname,
boolean userRecord)
Return the gender of the first name for param firstname. |
java.lang.Boolean |
addFirstname(java.lang.String firstname,
java.lang.String sex)
Adds a first name to the table. |
java.lang.Boolean |
addFirstname(java.lang.String firstname,
java.lang.String sex,
boolean userRecord)
Adds a first name to the table. |
static void |
deleteImportedData()
delete ALL imported data from the table ch_marlovits_firstnames but NOT the modifications/additions added by users. |
static void |
deleteUserData()
delete ALL user data/modifications data from the table ch_marlovits_firstnames. |
static boolean |
fieldExists(java.lang.String fieldName)
my way to test if a specific field is already created |
int |
getCacheTime()
Return time-to-live in cache for this object |
java.lang.String |
getFieldData(java.lang.String fieldName)
|
int |
getGender(java.lang.String firstName)
Return the gender of the first name for param firstname. |
int |
getGender(java.lang.String firstName,
boolean userRecord)
Return the gender of the first name for param firstname. if userRecord is true then we look for the firstname in the user records only. |
java.lang.String |
getGenderString(java.lang.String firstName)
Return the gender of the first name for param firstname. |
java.lang.String |
getGenderString(java.lang.String firstname,
boolean userRecord)
Return the gender of the first name for param firstname. if userRecord is true then we look for the firstname in the user records only. |
java.lang.String |
getLabel()
Einen menschenlesbaren Identifikationsstring für dieses Objet liefern |
static int |
getNextImportID()
Find the starting id to be used for importing new entries for imported entries. |
static java.lang.String |
getTableName2()
Get the table name from outside the class. |
static void |
initialize()
|
static MarlovitsFirstname |
load(java.lang.String id)
|
void |
setGenderForPatients()
set/correct gender for all patients - not yet functional |
void |
setInitializationData(IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
|
static boolean |
tableExists()
my way to test if the table is already created - I don't like the VERSION entries... |
static void |
testThis(boolean asdf)
|
java.lang.String |
toString()
|
Methods inherited from class ch.elexis.data.PersistentObject |
---|
addChangeListener, addSticker, addToList, addXid, begin, checkNull, checkZero, checkZeroDouble, clearCache, connect, connect, delete, deleteList, disconnect, equals, executeSQLScript, exists, exportData, fireChangeEvent, flatten, fold, get, get, getConnection, getDefaultCacheLifetime, getFieldType, getId, getInt, getLastUpdate, getList, getList, getMap, getSticker, getStickers, getWrappedId, getXid, getXid, getXids, hashCode, isAvailable, isDeleted, isDragOK, isMatching, isMatching, isMatching, isMatching, isShowDeleted, isValid, lock, map, relock, removeChangeListener, removeFromList, removeFromList, removeSticker, resetCache, set, set, setDefaultCacheLifetime, setInt, setMap, setShowDeleted, setTrace, state, storeToString, tableExists, ts, undelete, unlock |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String VERSION
public static final java.lang.String FLD_ID
public static final java.lang.String FLD_FIRSTNAME
public static final java.lang.String FLD_SEX
public static final java.lang.String FLD_DELETED
public static final java.lang.String FLD_TYPE
public static final java.lang.String FLDTYPE_IMPORTED
public static final java.lang.String FLDTYPE_USERRECORD
public static final java.lang.String MARLOVITS_FIRSTNAME_MALE
public static final java.lang.String MARLOVITS_FIRSTNAME_FEMALE
public static final int MALE
public static final int FEMALE
public static final int UNISEX
public static final int GENDERUNDEFINED
public static final java.lang.String MALE_STR
public static final java.lang.String FEMALE_STR
public static final java.lang.String UNISEX_STR
public static final java.lang.String GENDERUNDEFINED_STR
public static final java.lang.String MARLOVITS_FIRSTNAME_SEXES_STR
Constructor Detail |
---|
public MarlovitsFirstname(java.lang.String firstname, java.lang.String sex)
firstname
- : the firstname...sex
- : the gender for this name: w, m, b (both genders) or emptypublic MarlovitsFirstname(java.lang.String id, java.lang.String firstname, java.lang.String sex, boolean userRecord)
id
- the id. must be a valid id and not yet used - your
responsibility! Numeric id's will be treated as user entries,
alphanumeric entries are treated as imported entries +++++
modifyfirstname
- the firstname...sex
- the gender for this name: w, m, b (both genders) or emptypublic MarlovitsFirstname(java.lang.String id)
id
- Stringpublic MarlovitsFirstname()
Method Detail |
---|
public static boolean tableExists()
public static boolean fieldExists(java.lang.String fieldName)
public static void testThis(boolean asdf)
public static void _deleteFirstname(java.lang.String firstname, boolean userRecord)
public static MarlovitsFirstname load(java.lang.String id)
public java.lang.String toString()
toString
in class java.lang.Object
public static void initialize()
public java.lang.String getLabel()
PersistentObject
getLabel
in interface IPersistentObject
getLabel
in class PersistentObject
public static java.lang.String getTableName2()
public int getCacheTime()
PersistentObject
getCacheTime
in class PersistentObject
public java.lang.String getFieldData(java.lang.String fieldName)
public static java.lang.Boolean _addFirstname(java.lang.String firstname, java.lang.String sex, boolean userRecord)
firstname
- first namesex
- gender, String, "m", "w", "b" (both male AND female), all
others are not added to the dbuserRecord
- true if add as user record else add as imported record---userRecord
- true if add to user records (alphanumeric id's),
false if add to imported records (numeric id's)
public static java.lang.Boolean _addFirstname(java.lang.String firstname, java.lang.String sex)
firstname
- = first namesex
- = gender, String, "m", "w", "b" (both male AND female), all
others are not added to the db
public static int _getGender(java.lang.String firstname)
firstname
- = first name
public static int _getGender(java.lang.String firstname, boolean userRecord)
firstname
- first nameuserRecord
- boolean, true if we should look for a user record, else we
look for an imported record
public static java.lang.String _getGenderString(java.lang.String firstname)
firstname
- = first name
public static java.lang.String _getGenderString(java.lang.String firstname, boolean userRecord)
firstname
- = first nameuserRecord
- boolean, true if we should look for a user record, else we
look for an imported record
public static void deleteImportedData()
public static void deleteUserData()
public static int getNextImportID()
public void setGenderForPatients()
public void setInitializationData(IConfigurationElement config, java.lang.String propertyName, java.lang.Object data) throws CoreException
CoreException
public int getGender(java.lang.String firstName)
IGenderService
getGender
in interface IGenderService
public int getGender(java.lang.String firstName, boolean userRecord)
IGenderService
getGender
in interface IGenderService
firstName
- first nameuserRecord
- boolean, true if we should look for a user record, else we
look for an imported record
public java.lang.String getGenderString(java.lang.String firstName)
IGenderService
getGenderString
in interface IGenderService
public java.lang.Boolean addFirstname(java.lang.String firstname, java.lang.String sex, boolean userRecord)
IGenderService
addFirstname
in interface IGenderService
firstname
- first namesex
- gender, String, "m", "w", "b" (both male AND female), all
others are not added to the dbuserRecord
- true if add to user records (alphanumeric id's), false if add
to imported records (numeric id's)
public java.lang.Boolean addFirstname(java.lang.String firstname, java.lang.String sex)
IGenderService
addFirstname
in interface IGenderService
firstname
- = first namesex
- = gender, String, "m", "w", "b" (both male AND female), all
others are not added to the db
public java.lang.String getGenderString(java.lang.String firstname, boolean userRecord)
IGenderService
getGenderString
in interface IGenderService
firstname
- = first nameuserRecord
- boolean, true if we should look for a user record, else we
look for an imported record
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |