Implementing storage of a new item type

About this task

You can define storage behavior for a new item type by doing the following:

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. Next, go through the same steps listed in Storing existing types of items differently, but apply them to your new item type (that is, replace the string Page with MyNewItemType throughout the code samples you see).