jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From conflue...@apache.org
Subject [CONF] Apache Jackrabbit: Advanced Mapping Strategies (page edited)
Date Wed, 20 Feb 2008 20:41:00 GMT
Advanced Mapping Strategies (JCR) edited by Jukka Zitting
      Page: http://cwiki.apache.org/confluence/display/JCR/Advanced+Mapping+Strategies
   Changes: http://cwiki.apache.org/confluence/pages/diffpagesbyversion.action?pageId=75365&originalVersion=0&revisedVersion=1

Comment:
---------------------------------------------------------------------



Change summary:
---------------------------------------------------------------------



Change summary:
---------------------------------------------------------------------



Change summary:
---------------------------------------------------------------------



Change summary:
---------------------------------------------------------------------



Content:
---------------------------------------------------------------------

h2. Inheritance

TODO

h2. Interface

TODO

h2. Components

A component is an entity that cannot live by its own, but has a logical meaning. Take for
example an Address. It may live alone, but doesn't make much sense in some systems. Once associated
with an User it starts making sense. Now, as in RDBMS you can choose the persist this as a
record in a separate table with a 1-1 relation, or you may choose to persist Address field
along with the User.

Now, returning to JCR, the component is fitting perfectly the mixin notion. A mixin cannot
live by its own in the repository. It is associated with some node. It's properties are added
to the set of original node.

h2. Group some bean attributes into a subnode

TODO

h2. Map to another node structure

Sometime, it should be interesting to map to a different jcr node structure. Here is an example,
for a class "File", we can have:

{code}
public class File
{
  private String mimeType;
  private String encoding;
  private InputStream data;
  private Calendar lastModified;
  // Add getters/setters
}
{code}

and in terms of JCR structure, we can have:

{code}
nt:file
  jcr:content
    jcr:mimeType
    jcr:encoding
    jcr:data
    jcr:lastModified
{code}

So, the jcr:content node is an extra node to specify in the mapping file.


---------------------------------------------------------------------
CONFLUENCE INFORMATION
This message is automatically generated by Confluence

Unsubscribe or edit your notifications preferences
   http://cwiki.apache.org/confluence/users/viewnotifications.action

If you think it was sent incorrectly contact one of the administrators
   http://cwiki.apache.org/confluence/administrators.action

If you want more information on Confluence, or have a bug to report see
   http://www.atlassian.com/software/confluence



Mime
View raw message