nyla.solutions.global.data.Data Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nyla.solutions.global Show documentation
Show all versions of nyla.solutions.global Show documentation
Nyla Solutions Global Java API provides support for basic application
utilities (application configuration, data encryption, debugger and text
processing).
The newest version!
package nyla.solutions.global.data;
import java.io.*;
import java.util.*;
import nyla.solutions.global.data.Criteria;
import nyla.solutions.global.data.Updateable;
import nyla.solutions.global.util.Debugger;
//import solutions.global.data.CriteriaComparator;
//import solutions.global.data.UpdateDateComparator;
/**
* Data represents a serializable data type.
* @author Gregory Green
* @version 1.0
*/
public abstract class Data
implements Serializable
{
/**
*
*/
private static final long serialVersionUID = -2411033885084918560L;
/**
* Represent a true value
*/
public static final int NULL = -1;
/**
* Represent a true value
*/
public static final String TRUE = "T";
/**
* Represent a flag value
*/
public static final String FALSE = "F";
/**
* Represent a true value
*/
public static final String YES = "Y";
/**
* Represent a flase value
*/
public static final String NO = "N";
/**
* Determines whether the provided str is equal to null
* or the length is equal to zero
*/
public static boolean isNull(String str)
{
return str == null || str.trim().length() == 0 ||
"null".equals(str.trim());
} //---------------------------------------------
/**
* @return the string representation of a object
*/
public String toString()
{
return Debugger.toString(this);
}
/**
* Sort a list
*/
public static Collection