Implementing storage of a new item type

You can define how new item types are stored by the Storage Layer using the DAO implementation pattern.

Procedure

  1. In the com.tridion.storage package, create a custom class for your item type or entity. This class must extend the com.tridion.storage.BaseEntity class. Here is a sample entity class for an item type called MyNewType:
    package com.tridion.storage;
    
    import javax.persistence.Table;
    import javax.persistence.Entity;
    
    @Entity
    // Only if you intend to store this item type in a database, 
    // provide a database table name in which to store it.
    @Table(name="MYNEWTYPE_TABLE")
    
    public class MyNewType extends BaseEntity {
    	// data model of your item type; typically, a list of properties
    	// representing the fields of your item type.
    }
  2. Go through the same steps listed in Customizing storage of an existing item type, but apply them to your new item type (that is, replace the string Page with MyNewItemType throughout the code samples you see).