Node sequence = getSequence( idSourceKey );
if ( sequence == null ) {
// sequence nodes are expected to have been created up-front
if ( idSourceKey.getMetadata().getType() == IdSourceType.SEQUENCE ) {
throw new HibernateException( "Sequence missing: " + idSourceKey.getMetadata().getName() );
}
// table sequence nodes (think of them as rows in a generator table) are created upon first usage
else {
addTableSequence( idSourceKey.getMetadata(), (String) idSourceKey.getColumnValues()[0], initialValue );
sequence = getSequence( idSourceKey );