Skip to content

Commit

Permalink
use DN id classes
Browse files Browse the repository at this point in the history
  • Loading branch information
andyjefferson committed Jun 10, 2014
1 parent 57384e8 commit 568d4e1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
28 changes: 28 additions & 0 deletions many_to_many_attributed/assembly.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>src</id>
<formats>
<format>zip</format>
</formats>
<fileSets>
<fileSet>
<directory></directory>
<includes>
<include>README*</include>
<include>*.txt</include>
<include>*.xml</include>
<include>*.properties</include>
</includes>
<excludes>
<exclude>assembly.xml</exclude>
<exclude>datanucleus.log</exclude>
</excludes>
</fileSet>
<fileSet>
<directory>src</directory>
</fileSet>
</fileSets>

</assembly>

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.io.Serializable;
import java.util.StringTokenizer;

import javax.jdo.identity.LongIdentity;
import org.datanucleus.identity.LongId;

//@PersistenceCapable
public class BusinessRelation
Expand Down Expand Up @@ -69,8 +69,8 @@ public String getMeetingLocation()
*/
public static class PK implements Serializable
{
public LongIdentity customer; // Use same name as field above
public LongIdentity supplier; // Use same name as field above
public LongId customer; // Use same name as field above
public LongId supplier; // Use same name as field above

public PK()
{
Expand All @@ -79,8 +79,8 @@ public PK()
public PK(String s)
{
StringTokenizer st = new StringTokenizer(s, "::");
this.customer = new LongIdentity(Customer.class, st.nextToken());
this.supplier = new LongIdentity(Supplier.class, st.nextToken());
this.customer = new LongId(Customer.class, st.nextToken());
this.supplier = new LongId(Supplier.class, st.nextToken());
}

public String toString()
Expand Down

0 comments on commit 568d4e1

Please sign in to comment.