templates.udt.stg Maven / Gradle / Ivy
javaIONameMap ::= [
"oid" : "Int",
"tid" : "RowId",
"xid" : "Int",
"cid" : "Int",
"bool" : "Boolean",
"byte" : "Byte",
"int2" : "Short",
"int4" : "Int",
"int8" : "Long",
"float4" : "Float",
"float8" : "Double",
"text" : "String",
"name" : "String",
"bytea" : "Bytes",
"date" : "Date",
"time" : "Time",
"timetz" : "Time",
"timestamp" : "Timestamp",
"timestamptz" : "Timestamp",
"numeric" : "BigDecimal",
"uuid" : "Object",
"money" : "BigDecimal",
"xml" : "SQLXML",
"json" : "String",
default : "Object"
]
javaIOCastMap ::= [
"uuid" : "(java.util.UUID) "
]
javaTypeNameMap ::= [
"oid" : "Integer",
"tid" : "RowId",
"xid" : "Integer",
"cid" : "Integer",
"bool" : "Boolean",
"byte" : "Byte",
"int2" : "Short",
"int4" : "Integer",
"int8" : "Long",
"float4" : "Float",
"float8" : "Double",
"text" : "String",
"name" : "String",
"bytea" : "byte[]",
"date" : "java.sql.Date",
"time" : "java.sql.Time",
"timetz" : "java.sql.Time",
"timestamp" : "java.sql.Timestamp",
"timestamptz" : "java.sql.Timestamp",
"numeric" : "java.math.BigDecimal",
"uuid" : "java.util.UUID",
"money" : "java.math.BigDecimal",
"xml" : "java.sql.SQLXML",
"json" : "String",
default : key
]
castName(attrInfo) ::= <<
()
>>
prop(attrInfo) ::= <<
private ;
>>
getSet(attrInfo) ::= <<
public get() {
return ;
}
public void set( ) {
this. = ;
}
>>
main(type,typeInfo,isInPackage,package) ::= <<
package ;
import java.util.UUID;
import java.sql.SQLData;
import java.sql.SQLInput;
import java.sql.SQLOutput;
import java.sql.SQLException;
import com.impossibl.postgres.api.jdbc.*;
public class implements SQLData {
@Override
public String getSQLTypeName() {
return "";
}
@Override
public void readSQL(SQLInput stream, String typeName) throws SQLException {
PGSQLInput in = (PGSQLInput) stream;
= in.read();
}>
}
@Override
public void writeSQL(SQLOutput stream) throws SQLException {
PGSQLOutput out = (PGSQLOutput) stream;
();
}>
}
}
>>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy