161 lines
4.8 KiB
Java
161 lines
4.8 KiB
Java
// ============================================================================
|
|
//
|
|
// Talend Community Edition
|
|
//
|
|
// Copyright (C) 2006-2014 Talend - www.talend.com
|
|
//
|
|
// This library is free software; you can redistribute it and/or
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
// License as published by the Free Software Foundation; either
|
|
// version 2.1 of the License.
|
|
//
|
|
// This library 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
|
|
// Lesser 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., 675 Mass Ave, Cambridge, MA 02139, USA.
|
|
//
|
|
// ============================================================================
|
|
|
|
package routines;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
|
|
|
|
public class SystemOperation {
|
|
|
|
// /**
|
|
// * DATE( ) Returns the internal system date.
|
|
// *
|
|
// * {talendTypes} Date
|
|
// *
|
|
// * {Category} SystemOperation
|
|
// *
|
|
// * {example} DATE()
|
|
// *
|
|
// */
|
|
// public static String DATE() {
|
|
// Date date = new Date();
|
|
// return date;
|
|
// }
|
|
|
|
// /**
|
|
// * NAP Suspends execution of a BASIC program, pausing for a specified number of milliseconds.
|
|
// *
|
|
// * {talendTypes} String
|
|
// *
|
|
// * {Category} SystemOperation
|
|
// *
|
|
// * {param} long(5000)
|
|
// *
|
|
// * {example} NAP(5000)
|
|
// *
|
|
// */
|
|
// public static void NAP(long milliseconds) {
|
|
// try {
|
|
// Thread.sleep(milliseconds);
|
|
// } catch (InterruptedException e) {
|
|
// e.printStackTrace();
|
|
// }
|
|
// }
|
|
|
|
// /**
|
|
// * SLEEP Suspends execution of a BASIC program, pausing for a specified number of seconds.
|
|
// *
|
|
// * {talendTypes} String
|
|
// *
|
|
// * {Category} SystemOperation
|
|
// *
|
|
// * {param} long(5000)
|
|
// *
|
|
// * {example} SLEEP(5000)
|
|
// *
|
|
// */
|
|
// public static void SLEEP(long milliseconds) {
|
|
// try {
|
|
// Thread.sleep(milliseconds);
|
|
// } catch (InterruptedException e) {
|
|
// e.printStackTrace();
|
|
// }
|
|
// }
|
|
|
|
// STATUS( ) Reports the results of a function or statement previously
|
|
// executed.
|
|
// SYSTEM( ) Checks the status of a system function.
|
|
|
|
// /**
|
|
// * TIME( ) Returns the time in internal format.
|
|
// *
|
|
// * {talendTypes} String
|
|
// *
|
|
// * {Category} SystemOperation
|
|
// *
|
|
// * {example} TIME()
|
|
// *
|
|
// */
|
|
// public static String TIME() {
|
|
// Date date = new Date();
|
|
// SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss");
|
|
// return df.format(date);
|
|
// }
|
|
|
|
// /**
|
|
// * TIMEDATE( ) Returns the time and date.
|
|
// *
|
|
// * {talendTypes} String
|
|
// *
|
|
// * {Category} SystemOperation
|
|
// *
|
|
// * {example} TIMEDATE()
|
|
// *
|
|
// */
|
|
// public static String TIMEDATE() {
|
|
// Date date = new Date();
|
|
// SimpleDateFormat df = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
|
|
// return df.format(date);
|
|
// }
|
|
|
|
// CHECKSUM( ) Returns a cyclical redundancy code (a checksum value).
|
|
// CONVERT Converts specified characters in a string to designated
|
|
// replacement characters.
|
|
|
|
// CONVERT( ) Replaces every occurrence of specified characters in a variable
|
|
// with other specified characters.
|
|
|
|
// CRC32( ) Returns a 32-bit cyclic redundancy code.
|
|
|
|
// EXCHANGE( ) Replaces one character with another or deletes all occurrences
|
|
// of a specific character.
|
|
|
|
// FIELD( ) Examines a string expression for any occurrence of a specified
|
|
// delimiter and returns a substring that is marked by that delimiter.
|
|
|
|
// FIELDSTORE( ) Replaces, deletes, or inserts substrings in a specified character
|
|
// string.
|
|
|
|
// FINDSTR Locates a given occurrence of a substring.
|
|
// FOLD( ) Divides a string into a number of shorter sections.
|
|
|
|
// GROUP( ) Returns a substring that is located between the stated number
|
|
// of occurrences of a delimiter.
|
|
|
|
// GROUPSTORE Modifies existing character strings by inserting, deleting, or
|
|
// replacing substrings that are separated by a delimiter
|
|
// character.
|
|
|
|
// MATCHFIELD( ) Returns the contents of a substring that matches a specified
|
|
// pattern or part of a pattern.
|
|
|
|
// QUOTE( ) Encloses an expression in double quotation marks.
|
|
|
|
// RAISE( ) Converts system delimiters that appear in expressions to the
|
|
// next higher-level delimiter.
|
|
|
|
// SOUNDEX( ) Returns the soundex code for a string.
|
|
|
|
}
|