Procedure - Creating a Modeled Datastore Sequence
1. Create a class <MySequence> in <MyPackage> that extends <MySequence> .
2. Specify the “GenAsDatastoreSequence” annotation and sequence properties as the annotation’s arguements. Specify the initial seed and increment values if the defaults are not sufficient. For example, for seed value 1000 and increment 100, the resulting Java source file would be as follows:
import com.ptc.windchill.annotations.metadata.GenAsDatastoreSequence;
@GenAsDatastoreSequence (objectName="mySequence", seed=1000, increment=100)
public class MySequence extends _MySequence {
}
3. Compile the <MySequence>.java class in <MyPackage>.
4. Generate the DDL scripts.
5. Execute the sequence DDL. From a Windchill shell execute: <WindchillHome>/db/execute_sql_script.bat <MyPackage>/create_<MySequence>_ sequence.sql