/** * Get sequence corresponding to the name */ @Override public Sequence getSequence(String seqName) { if (seqName == null) { return getDefaultSequence(); } else { if (this.sequences != null) { return (Sequence)this.sequences.get(seqName); } else { return null; } } }
/** * INTERNAL: * Used only for writing into XML or Java. */ @Override public Sequence getDefaultSequenceToWrite() { if (usesPlatformDefaultSequence()) { return null; } else { return getDefaultSequence(); } }
/** * Set the number of sequence values to preallocate. * Preallocating sequence values can greatly improve insert performance. */ public void setSequencePreallocationSize(int size) { getDefaultSequence().setPreallocationSize(size); }
/** * This method sets the update sequence number query. It * allows for other queries to be used instead of the default one. */ public void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery) { if (getDefaultSequence() instanceof QuerySequence) { ((QuerySequence)getDefaultSequence()).setUpdateQuery(updateSequenceNumberQuery); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "setUpdateQuery"); } }
/** * OBSOLETE: * This method lazy initializes the select sequence number query. It * allows for other queries to be used instead of the default one. */ public ValueReadQuery getSelectSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getSelectQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getSelectQuery"); } }
/** * This method sets the update sequence number query. It * allows for other queries to be used instead of the default one. */ public void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery) { if (getDefaultSequence() instanceof QuerySequence) { ((QuerySequence)getDefaultSequence()).setUpdateQuery(updateSequenceNumberQuery); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "setUpdateQuery"); } }
/** * OBSOLETE: * This method lazy initializes the select sequence number query. It * allows for other queries to be used instead of the default one. */ public ValueReadQuery getSelectSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getSelectQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getSelectQuery"); } }
/** * INTERNAL: * Used only for writing into XML or Java. */ public Sequence getDefaultSequenceToWrite() { if (usesPlatformDefaultSequence()) { return null; } else { return getDefaultSequence(); } }
/** * OBSOLETE: * This method lazy initializes the update sequence number query. It * allows for other queries to be used instead of the default one. */ public DataModifyQuery getUpdateSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getUpdateQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getUpdateQuery"); } }
/** * OBSOLETE: * This method lazy initializes the select sequence number query. It * allows for other queries to be used instead of the default one. */ public ValueReadQuery getSelectSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getSelectQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getSelectQuery"); } }
/** * Set the number of sequence values to preallocate. * Preallocating sequence values can greatly improve insert performance. */ public void setSequencePreallocationSize(int size) { getDefaultSequence().setPreallocationSize(size); }
/** * Set the number of sequence values to preallocate. * Preallocating sequence values can greatly improve insert performance. */ public void setSequencePreallocationSize(int size) { getDefaultSequence().setPreallocationSize(size); }
/** * This method sets the update sequence number query. It * allows for other queries to be used instead of the default one. */ public void setUpdateSequenceQuery(DataModifyQuery updateSequenceNumberQuery) { if (getDefaultSequence() instanceof QuerySequence) { ((QuerySequence)getDefaultSequence()).setUpdateQuery(updateSequenceNumberQuery); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "setUpdateQuery"); } }
/** * OBSOLETE: * This method lazy initializes the update sequence number query. It * allows for other queries to be used instead of the default one. */ public DataModifyQuery getUpdateSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getUpdateQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getUpdateQuery"); } }
/** * OBSOLETE: * This method lazy initializes the update sequence number query. It * allows for other queries to be used instead of the default one. */ public DataModifyQuery getUpdateSequenceQuery() { if (getDefaultSequence() instanceof QuerySequence) { return ((QuerySequence)getDefaultSequence()).getUpdateQuery(); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "getUpdateQuery"); } }
/** * INTERNAL: * Used only for writing into XML or Java. */ public Sequence getDefaultSequenceToWrite() { if (usesPlatformDefaultSequence()) { return null; } else { return getDefaultSequence(); } }
/** * OBSOLETE: * Can override the default query for returning the sequence numbers. * This query must be a valid query that has one parameter which is * the sequence name. */ public void setSelectSequenceNumberQuery(ValueReadQuery seqQuery) { if (getDefaultSequence() instanceof QuerySequence) { ((QuerySequence)getDefaultSequence()).setSelectQuery(seqQuery); } else { throw ValidationException.wrongSequenceType(Helper.getShortClassName(getDefaultSequence()), "setSelectQuery"); } }
/** * INTERNAL: * Indicates whether defaultSequence is the same as platform default sequence. */ public boolean usesPlatformDefaultSequence() { if (!hasDefaultSequence()) { return true; } else { return getDefaultSequence().equals(createPlatformDefaultSequence()); } }
/** * INTERNAL: * Indicates whether defaultSequence is the same as platform default sequence. */ @Override public boolean usesPlatformDefaultSequence() { if (!hasDefaultSequence()) { return true; } else { return getDefaultSequence().equals(createPlatformDefaultSequence()); } }
/** * INTERNAL: * Indicates whether defaultSequence is the same as platform default sequence. */ public boolean usesPlatformDefaultSequence() { if (!hasDefaultSequence()) { return true; } else { return getDefaultSequence().equals(createPlatformDefaultSequence()); } }