CDO數據結構基礎(1)

CDO中存儲的數據類型用以下的接口常量定義:
package com.cdoframework.cdolib.base;

import java.io.Serializable;
import java.text.SimpleDateFormat;


public interface DataType extends Serializable
{

	
	int NONE_TYPE				=0;

	int BOOLEAN_TYPE			=1;
	int BYTE_TYPE				=2;
	int SHORT_TYPE				=3;
	int INTEGER_TYPE			=4;
	int LONG_TYPE				=5;
	int FLOAT_TYPE				=6;
	int DOUBLE_TYPE				=7;
	int STRING_TYPE				=8;
	int DATE_TYPE				=9;
	int TIME_TYPE				=10;
	int DATETIME_TYPE			=11;
	int CDO_TYPE				=12;
	int RECORD_TYPE				=13;

	int BOOLEAN_ARRAY_TYPE		=101;
	int BYTE_ARRAY_TYPE			=102;
	int SHORT_ARRAY_TYPE		=103;
	int INTEGER_ARRAY_TYPE		=104;
	int LONG_ARRAY_TYPE			=105;
	int FLOAT_ARRAY_TYPE		=106;
	int DOUBLE_ARRAY_TYPE		=107;
	int STRING_ARRAY_TYPE		=108;
	int DATE_ARRAY_TYPE			=109;
	int TIME_ARRAY_TYPE			=110;
	int DATETIME_ARRAY_TYPE		=111;
	int CDO_ARRAY_TYPE			=112;
	int RECORD_SET_TYPE			=113;
	
	String	DATETIME_FORMAT_STRING		="yyyy-MM-dd HH:mm:ss";
	String	DATE_FORMAT_STRING			="yyyy-MM-dd";
	String	TIME_FORMAT_STRING			="HH:mm:ss";
	
	SimpleDateFormat DATETIME_FORMAT	=new SimpleDateFormat (DATETIME_FORMAT_STRING);
	SimpleDateFormat DATE_FORMAT		=new SimpleDateFormat (DATE_FORMAT_STRING);
	SimpleDateFormat TIME_FORMAT		=new SimpleDateFormat (TIME_FORMAT_STRING);	
}

能夠存儲的數據類型爲:
布爾類型、byte類型、short類型、int類型、long類型、float類型、double類型、String類型、Date類型、Time類型
DateTime類型、CDO類型、布爾數組類型、byte數組類型、short數組類型、int數組類型、long數組類型、float
數組類型、double數組類型、String數組類型、Date數組類型、Time數組類型、DateTime數組類型、CDO數組類型
事先定義好這些數據類型是構造CDO數據結構的基石!
相關文章
相關標籤/搜索