Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In short, an embeddable is <fill me in!>... a seperation of data into a Java class that relies on the owning Entity for it's identity. Many(most) times an embeddable resides in the same database row as the owning Entity.

Samples

Schema

Class diagram

...

In the code snippet below, there is a User Entity which has a collection of ordered Embedded addressaddresses.

Code Block
titleAddress.java
borderStylesolid
@Embeddable
public class Address {
	@Basic
	private String street;
	@Basic
	private String city;
	@Basic
	private String state;
	@Basic
	private Integer zip;

	public Address(){
	}
//...
}

...