|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.astroshare.astroonline.database.Database
com.astroshare.astroonline.database.Sql
public class Sql
Implementation of the Astro-Online database access layer.
All database access is defined in this class.
| Field Summary | |
|---|---|
protected static org.apache.log4j.Logger |
log
|
| Fields inherited from class com.astroshare.astroonline.database.Database |
|---|
conn |
| Constructor Summary | |
|---|---|
Sql()
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
checkEntry(Visitor visitor)
Check whether the atlas data found in object visitor is valid. |
int |
deleteHoroscope(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage)
Remove horoscope from database. |
java.lang.String |
getAspect(java.lang.String language,
java.lang.String id,
int planetfrom,
int planetto,
int aspect,
java.lang.String aspectsAll,
boolean param_switch)
Get text from table aspects. |
java.sql.ResultSet |
getConfiguration()
Select configuration from database. |
java.lang.String |
getConfigurationValue(java.lang.String param)
Get configuration value for a specific parameter. |
java.lang.String |
getGeneralText(java.lang.String language,
java.lang.String id,
int textnr)
Get text from table generaltext. |
java.lang.String[] |
getHoroscopeInfo(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage)
Gets horoscope information from the database. |
java.sql.ResultSet |
getInstalledHoroscopes()
Select installed horoscopes from database. |
java.lang.String[][] |
getLOVCity(java.lang.String country,
java.lang.String city)
Builds a List of Values of cities for a specific country in HTML form. |
boolean |
getPartner(java.lang.String language,
java.lang.String id,
int sun1,
int sun2,
java.lang.String[] text)
Select text from table partner. |
java.util.ArrayList<java.lang.Object> |
getPartnerToList(java.lang.String language,
java.lang.String id,
int sun1,
int sun2)
Return partner text in an aaraylist. |
java.lang.String |
getPlanetInHouse(java.lang.String language,
java.lang.String id,
int planet,
int house)
Get text form table planetinhouse. |
java.lang.String |
getPlanetInSign(java.lang.String language,
java.lang.String id,
int planet,
int sign)
Get text from table planetinsign. |
java.lang.String |
getPlanetText(java.lang.String language,
java.lang.String id,
int planet)
Get text from table planets. |
java.lang.String |
getSignText(java.lang.String language,
java.lang.String id,
int sign)
Get text from table signs. |
int |
insertHoroscope(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage,
java.lang.String horoscopeType,
java.lang.String horoscopeDbid,
java.lang.String horoscopeTitle,
java.lang.String horoscopeInput,
java.lang.String horoscopeOutput,
java.lang.String horoscopeIntro)
Add a new horoscope to the database. |
int |
setConfigurationValue(java.lang.String param,
java.lang.String value)
Update the value for a specific parameter. |
int |
updateHoroscopeInfo(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage,
java.lang.String horoscopeType,
java.lang.String horoscopeDbid,
java.lang.String horoscopeTitle,
java.lang.String horoscopeInput,
java.lang.String horoscopeOutput,
java.lang.String horoscopeIntro)
Update horoscope information. |
| Methods inherited from class com.astroshare.astroonline.database.Database |
|---|
close, execute, executeQuery |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.apache.log4j.Logger log
| Constructor Detail |
|---|
public Sql()
throws javax.naming.NamingException,
java.sql.SQLException
Constructor.
javax.naming.NamingException - Exception is thrown when JNDI datasource is not found
java.sql.SQLException - Exception is thrown when a connection cannot be established| Method Detail |
|---|
public java.lang.String[][] getLOVCity(java.lang.String country,
java.lang.String city)
Builds a List of Values of cities for a specific country in HTML form.
country - Country to search forcity - Part of the city to search for
public boolean checkEntry(Visitor visitor)
Check whether the atlas data found in object visitor is valid.
visitor - Object holding the data of a visitor
public java.lang.String getGeneralText(java.lang.String language,
java.lang.String id,
int textnr)
Get text from table generaltext.
language - Languageid - Horoscope IDtextnr - Text number
public java.lang.String getSignText(java.lang.String language,
java.lang.String id,
int sign)
Get text from table signs.
language - Languageid - Horoscope IDsign - Sign number
public java.lang.String getPlanetText(java.lang.String language,
java.lang.String id,
int planet)
Get text from table planets.
language - Languageid - Horoscope IDplanet - Planet number
public java.lang.String getPlanetInSign(java.lang.String language,
java.lang.String id,
int planet,
int sign)
Get text from table planetinsign.
language - Languageid - Horoscope IDplanet - Planet numbersign - Sign number
public java.lang.String getPlanetInHouse(java.lang.String language,
java.lang.String id,
int planet,
int house)
Get text form table planetinhouse.
language - Languageid - Horoscope IDplanet - Planet numberhouse - House number
public java.lang.String getAspect(java.lang.String language,
java.lang.String id,
int planetfrom,
int planetto,
int aspect,
java.lang.String aspectsAll,
boolean param_switch)
Get text from table aspects.
language - Languageid - Horoscope IDplanetfrom - Planet number planet fromplanetto - Planet number planet toaspect - AspectaspectsAll - Show all aspects?param_switch - TRUE=Switch parameters planetfrom and planetto if
applicable;FALSE=Never switch parameter planetfrom and
planetto
public boolean getPartner(java.lang.String language,
java.lang.String id,
int sun1,
int sun2,
java.lang.String[] text)
Select text from table partner.
language - Languageid - Horoscope IDsun1 - Sun person 1sun2 - Sub person 2text - Text array
public java.util.ArrayList<java.lang.Object> getPartnerToList(java.lang.String language,
java.lang.String id,
int sun1,
int sun2)
Return partner text in an aaraylist.
language - Languageid - Horoscope IDsun1 - Sun person 1sun2 - Sun person 2
public java.sql.ResultSet getConfiguration()
Select configuration from database.
public java.lang.String getConfigurationValue(java.lang.String param)
Get configuration value for a specific parameter.
param - Configuration parameter
public int setConfigurationValue(java.lang.String param,
java.lang.String value)
Update the value for a specific parameter.
param - Parameter to be updatedvalue - New value for parameter to be updated
public java.sql.ResultSet getInstalledHoroscopes()
Select installed horoscopes from database.
public java.lang.String[] getHoroscopeInfo(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage)
Gets horoscope information from the database.
horoscopeId - Horoscope idhoroscopeLanguage - Horoscope language
public int updateHoroscopeInfo(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage,
java.lang.String horoscopeType,
java.lang.String horoscopeDbid,
java.lang.String horoscopeTitle,
java.lang.String horoscopeInput,
java.lang.String horoscopeOutput,
java.lang.String horoscopeIntro)
Update horoscope information.
horoscopeId - Horoscope idhoroscopeLanguage - Horoscope languagehoroscopeType - Horoscope typehoroscopeDbid - Horoscope database idhoroscopeTitle - Horoscope titlehoroscopeInput - Horoscope input templatehoroscopeOutput - Horoscope output templatehoroscopeIntro - Horoscope intro text
public int deleteHoroscope(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage)
Remove horoscope from database.
horoscopeId - Horoscope idhoroscopeLanguage - Horoscope language
public int insertHoroscope(java.lang.String horoscopeId,
java.lang.String horoscopeLanguage,
java.lang.String horoscopeType,
java.lang.String horoscopeDbid,
java.lang.String horoscopeTitle,
java.lang.String horoscopeInput,
java.lang.String horoscopeOutput,
java.lang.String horoscopeIntro)
Add a new horoscope to the database.
horoscopeId - Horoscope idhoroscopeLanguage - Horoscope languagehoroscopeType - Horoscope typehoroscopeDbid - Horoscope database idhoroscopeTitle - Horoscope titlehoroscopeInput - Horoscope input templatehoroscopeOutput - Horoscope output templatehoroscopeIntro - Horoscope intro text
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Astro-Online © 2001 − 2008 Astro Share
Documentation generated on: Thursday August 12th 2008 (PS)