on 09-25-2008 3:07 PM
Hi all,
Using CE 7.1 is possible to define a GENERATOR for a Custom Key on CAF Business Object?
Best regards
Isaías Barroso
Hi,
CAF does not have any key generator.
What you can do is, you can create a utility DC of java type. Create a Key Generator class that uses SAP's unique ID generator classes.
com.sap.guid.GUIDGeneratorFactory
com.sap.guid.IGUIDGenerator
Method to get the key will look like
public String getUUID() {
return this.generator.createGUID().toHexString();
}
Now use this class in your caf project to generate unique keys.
Hope this helps,
Ashutosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Thanks by response, but i will need something like :
@Id
@GeneratedValue(generator="InvTab")
@TableGenerator(name="InvTab", table="ID_GEN",
pkColumnName="ID_NAME", valueColumnName="ID_VAL",
pkColumnValue="INV_GEN")
private long id;
I wouldn't to implement it, but i will do it on the utility class.
Best regards
Isaías Barroso
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.