Adempiere 3.4.0s

org.compiere.sqlj
Class Adempiere

java.lang.Object
  extended by org.compiere.sqlj.Adempiere
All Implemented Interfaces:
Serializable

public class Adempiere
extends Object
implements Serializable

SQLJ Adempiere Control and Utility Class

Version:
$Id: Adempiere.java,v 1.4 2006/10/02 19:49:59 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
static BigDecimal HUNDRED
          Hundred 100
static BigDecimal ONE
          One 1
protected static String s_pwd
          Connection Password
static String s_type
          Server Type
protected static String s_uid
          Connection User
protected static String s_url
          Connection URL
static String TYPE_ORACLE
          Oracle Server
static String TYPE_POSTGRESQL
          PostgreSQL
static BigDecimal ZERO
          Zero 0
 
Constructor Summary
Adempiere()
           
 
Method Summary
static Timestamp addDays(Timestamp day, int offset)
          Deprecated.  
static String charAt(String source, int posIndex)
          Deprecated.  
static Timestamp firstOf(Timestamp p_dateTime, String XX)
          Deprecated.  
static String getChars(BigDecimal d)
          Deprecated.  
static Timestamp getDate()
          Deprecated.  
static int getDaysBetween(Timestamp start, Timestamp end)
          Deprecated.  
static String getProperties()
          Get Environment Info
static String getProperty(String key)
          Get Environment Info
static String getServerType()
          Get Server Type
static String getVersion()
          Get Version
static Timestamp nextBusinessDay(Timestamp day)
          Next Business Day.
static int nextID(int AD_Sequence_ID, String System)
          Mext ID
static Timestamp trunc(Timestamp p_dateTime)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_ORACLE

public static final String TYPE_ORACLE
Oracle Server

See Also:
Constant Field Values

TYPE_POSTGRESQL

public static final String TYPE_POSTGRESQL
PostgreSQL

See Also:
Constant Field Values

s_type

public static String s_type
Server Type


s_url

protected static String s_url
Connection URL


s_uid

protected static String s_uid
Connection User


s_pwd

protected static String s_pwd
Connection Password


ZERO

public static final BigDecimal ZERO
Zero 0


ONE

public static final BigDecimal ONE
One 1


HUNDRED

public static final BigDecimal HUNDRED
Hundred 100

Constructor Detail

Adempiere

public Adempiere()
Method Detail

getVersion

public static String getVersion()
Get Version

Returns:
version

getProperties

public static String getProperties()
Get Environment Info

Returns:
properties

getProperty

public static String getProperty(String key)
                          throws SQLException
Get Environment Info

Parameters:
key - key
Returns:
property info
Throws:
SQLException

getServerType

public static String getServerType()
Get Server Type

Returns:
server type

trunc

public static Timestamp trunc(Timestamp p_dateTime)
Deprecated. 

Truncate Date

Parameters:
p_dateTime - date
Returns:
day

firstOf

public static Timestamp firstOf(Timestamp p_dateTime,
                                String XX)
Deprecated. 

Truncate Date

Parameters:
p_dateTime - date
XX - date part - Supported: DD(default),DY,MM,Q
Returns:
day (first)

getDaysBetween

public static int getDaysBetween(Timestamp start,
                                 Timestamp end)
Deprecated. 

Calculate the number of days between start and end.

Parameters:
start - start date
end - end date
Returns:
number of days (0 = same)

addDays

public static Timestamp addDays(Timestamp day,
                                int offset)
Deprecated. 

Return Day + offset (truncates)

Parameters:
day - Day
offset - day offset
Returns:
Day + offset at 00:00

nextBusinessDay

public static Timestamp nextBusinessDay(Timestamp day)
                                 throws SQLException
Next Business Day. (Only Sa/Su -> Mo)

Parameters:
day - day
Returns:
next business dat if day is "off"
Throws:
SQLException

charAt

public static String charAt(String source,
                            int posIndex)
Deprecated. 

Character At Position

Parameters:
source - source
posIndex - position 1 = first
Returns:
substring or null

nextID

public static int nextID(int AD_Sequence_ID,
                         String System)
                  throws SQLException
Mext ID

Parameters:
AD_Sequence_ID - sequence
System - system
Returns:
ID or -1
Throws:
SQLException

getDate

public static Timestamp getDate()
Deprecated. 

get current Date (Timestamp)

Returns:
Timestamp

getChars

public static String getChars(BigDecimal d)
Deprecated. 

get chars from a number

Parameters:
d - double
Returns:
String

Adempiere 3.4.0s

AdemPiere