<b>${word_selection}${cursor}</b><code>${word_selection}${cursor}</code><code>null</code><i>${word_selection}${cursor}</i><pre>${word_selection}${cursor}</pre>@author ${user}/**
* Get ${enclosing_type} from Cache
* @param ctx context
* @param _ID id
* @return ${enclosing_type}
*/
public static ${enclosing_type} get (Properties ctx, int _ID)
{
Integer key = new Integer (_ID);
${enclosing_type} retValue = (${enclosing_type})s_cache.get(key);
if (retValue != null)
return retValue;
retValue = new ${enclosing_type} (ctx, _ID, null);
if (retValue.get_ID() != 0)
s_cache.put(key, retValue);
return retValue;
} // get
/** Cache */
private static CCache<Integer,${enclosing_type}> s_cache = new CCache<Integer,${enclosing_type}>("", 20);${type} ${new_name} = (${type}) ${name};catch (${Exception} e) {
${cursor}// ${todo}: handle exception
}/******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved.
* This program is free software; you can redistribute it and/or modify it
* under the terms version 2 of the GNU General Public License as published
* by the Free Software Foundation. This program is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
* You may reach us at: ComPiere, Inc. - http://www.adempiere.org/license.html
* 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA or info@adempiere.org
*****************************************************************************/
do {
${line_selection}${cursor}
} while (${condition});else {
${cursor}
}else if (${condition}) {
${cursor}
}<code>false</code>for (int ${index} = 0; ${index} < ${array}.length; ${index}++) {
${line_selection}${cursor}
}for (int ${index} = 0; ${index} < ${array}.length; ${index}++) {
${array_type} ${array_element} = ${array}[${index}];
${cursor}
}for (Iterator ${iterator} = ${collection}.iterator(); ${iterator}.hasNext(); ) {
${type} ${element} = (${type}) ${iterator}.next();
${cursor}
}for (${iterable_type} ${iterable_element} : ${iterable}) {
${cursor}
}/** The Lines */
private ${array_type}[] m_lines = null;
/**
* Get Lines
* @param reload reload data
* @return array of lines
*/
public ${array_type}[] getLines (boolean reload)
{
if (m_lines != null && !reload)
return m_lines;
ArrayList list = new ArrayList();
${cursor}
//
m_lines = new ${array_type}[list.size()];
list.toArray(m_lines);
return m_lines;
} // getLines
if (${condition}) {
${line_selection}${cursor}
}if (${condition}) {
${cursor}
} else {
}if (${name} instanceof ${type}) {
${type} ${new_name} = (${type})${name};
${cursor}
}PreparedStatement pstmt = null;
try
{
pstmt = DB.prepareStatement(sql, get_trxName());
pstmt.setInt(1, x);
ResultSet rs = pstmt.executeQuery();
while (rs.next())
{
list.add (new XX (ctx, rs, get_trxName()));
}
rs.close();
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
log.log(Level.SEVERE, sql, e);
}
try
{
if (pstmt != null)
pstmt.close();
pstmt = null;
}
catch (Exception e)
{
pstmt = null;
}if (${name} == null) {
${name} = new ${type}(${arguments});
${cursor}
}
return ${name};/** Logger */
private static CLogger log = CLogger.getCLogger(${enclosing_type}.class);
public static void main(String[] args) {
${cursor}
}${type} ${name} = new ${type}(${arguments});//$$NON-NLS-${N}$$<code>null</code>private ${return_type} ${name}(${arguments}) {
${cursor}
}private static ${return_type} ${name}(${arguments}) {
${cursor}
}protected ${return_type} ${name}(${arguments}) {
${cursor}
}public ${return_type} ${name}(${arguments}) {
${cursor}
}new Runnable() {
public void run() {
${line_selection}
}
}switch (${key}) {
case ${value}:
${cursor}
break;
default:
break;
}synchronized (${mutex}) {
${line_selection}
}System.err.println(${word_selection}${cursor});System.out.println(${word_selection}${cursor});System.out.println("${enclosing_type}.${enclosing_method}()");public void test${name}() throws Exception {
${cursor}
}(${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]);ArrayList<{enclosing_type}> list = new ArrayList<{enclosing_type}>();
${cursor}
${enclosing_type}[] retValue = new ${enclosing_type}[list.size()];
list.toArray(retValue);
return retValue;/**
* String Representation
* @return info
*/
public String toString()
{
StringBuffer sb = new StringBuffer("${enclosing_type}[");
sb.append(getID())
.append("-").append(getName())
.append("]");
return sb.toString();
} // toString<code>true</code>try {
${line_selection}${cursor}
} catch (${Exception} e) {
// ${todo}: handle exception
}while (${enumeration}.hasMoreElements()) {
${type} ${element} = (${type}) ${enumeration}.nextElement();
${cursor}
}while (${iterator}.hasNext()) {
${type} ${element} = (${type}) ${iterator}.next();
${cursor}
}while (${condition}) {
${line_selection}${cursor}
}