Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.j256.ormlite.db;
 
 import java.util.List;
 
Netezza database type information used to create the tables, etc..

NOTE: This is the initial take on this database type. We hope to get access to an external database for testing. Please contact us if you'd like to help with this class.

Author(s):
Richard Kooijman
public class NetezzaDatabaseType extends BaseDatabaseType implements DatabaseType {
	private final static String DATABASE_URL_PORTION = "netezza";
	private final static String DRIVER_CLASS_NAME = "org.netezza.Driver";
	private final static String DATABASE_NAME = "Netezza";
	public boolean isDatabaseUrlThisType(String urlString dbTypePart) {
		return .equals(dbTypePart);
	}
	protected String getDriverClassName() {
	}
	public String getDatabaseName() {
		return ;
	}
	protected void appendByteType(StringBuilder sb) {
		sb.append("BYTEINT");
	}
	protected void configureGeneratedIdSequence(StringBuilder sbFieldType fieldTypeList<StringstatementsBefore,
			List<StringadditionalArgsList<StringqueriesAfter) {
		String sequenceName = fieldType.getGeneratedIdSequence();
		// needs to match dropColumnArg()
		StringBuilder seqSb = new StringBuilder(64);
		seqSb.append("CREATE SEQUENCE ");
		// when it is created, it needs to be escaped specially
		appendEscapedEntityName(seqSbsequenceName);
		statementsBefore.add(seqSb.toString());
		configureId(sbfieldTypestatementsBeforeadditionalArgsqueriesAfter);
	}
	public void dropColumnArg(FieldType fieldTypeList<StringstatementsBeforeList<StringstatementsAfter) {
		if (fieldType.isGeneratedIdSequence()) {
			StringBuilder sb = new StringBuilder(64);
			sb.append("DROP SEQUENCE ");
			statementsAfter.add(sb.toString());
		}
	}
	public void appendEscapedEntityName(StringBuilder sbString word) {
		sb.append('\"').append(word).append('\"');
	}
	public boolean isIdSequenceNeeded() {
		return true;
	}
	public void appendSelectNextValFromSequence(StringBuilder sbString sequenceName) {
		sb.append("SELECT NEXT VALUE FOR ");
		// this is word and not entity unfortunately
		appendEscapedWord(sbsequenceName);
	}
New to GrepCode? Check out our FAQ X