I realized that the JPAComponentPresentationDAO which is the base class we are using in our custom storage extension class have got changed a lot in terms of the class members and the method signature. This required us to re-write and re-build the class inherited from this DAO such that it implements and reflect correctly all the parent members.
A step-by-step guide for storage extension has been updated and written at my blog HERE
I hope it will help others while implementing Storage Extension for SDL Tridion 2013.
UPDATE: As requested, adding the class as under:
package com.tridion.storage.extension;
import com.tridion.broker.StorageException;
import com.tridion.storage.ComponentPresentation;
import com.tridion.storage.dao.ComponentPresentationDAO;
import com.tridion.storage.persistence.JPAComponentPresentationDAO;
import com.tridion.storage.util.ComponentPresentationTypeEnum;
import java.util.Collection;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component(“JPACustomComponentPresentationDAO”)
@Scope(“prototype”)
public class JPACustomComponentPresentationDAO
extends JPAComponentPresentationDAO
implements ComponentPresentationDAO
{
public JPACustomComponentPresentationDAO(String storageId, EntityManagerFactory entityManagerFactory, String storageType)
{
super(storageId, entityManagerFactory, storageType);
}
public JPACustomComponentPresentationDAO(String storageId, EntityManagerFactory entityManagerFactory, EntityManager entityManager, String storageType)
{
super(storageId, entityManagerFactory, entityManager, storageType);
}
public void create(ComponentPresentation itemToCreate, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
super.create(itemToCreate);
}
public void update(ComponentPresentation itemToUpdate, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
super.update(itemToUpdate);
}
public void remove(ComponentPresentation itemToRemove, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
remove(itemToRemove.getPublicationId(), itemToRemove.getComponentId(), itemToRemove.getTemplateId(), componentPresentationType);
}
public ComponentPresentation getComponentPresentation(int publicationId, int componentId, int templateId, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
return super.getComponentPresentation(publicationId, componentId, templateId, componentPresentationType);
}
public Collection<ComponentPresentation> findAll(int publicationId, int componentId, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
return super.findAll(publicationId, componentId, componentPresentationType);
}
public void remove(int publicationId, int componentId, int componentTemplateId, ComponentPresentationTypeEnum componentPresentationType)
throws StorageException
{
super.remove(publicationId, componentId, componentTemplateId, componentPresentationType);
}
public String getBindingName()
{
return super.getBindingName();
}
public String getStorageId()
{
return super.getStorageId();
}
public String getStorageType()
{
return super.getStorageType();
}
public String getTypeMapping()
{
return null;
}
}