Class MetadataStorage

java.lang.Object
org.exoplatform.social.core.metadata.storage.MetadataStorage

public class MetadataStorage extends Object
  • Constructor Details

    • MetadataStorage

      public MetadataStorage(MetadataDAO metadataDAO, MetadataItemDAO metadataItemDAO, org.exoplatform.services.cache.CacheService cacheService)
  • Method Details

    • getMetadataByKey

      public org.exoplatform.social.metadata.model.Metadata getMetadataByKey(org.exoplatform.social.metadata.model.MetadataKey metadataKey)
    • getMetadataById

      public org.exoplatform.social.metadata.model.Metadata getMetadataById(long id)
    • createMetadata

      public org.exoplatform.social.metadata.model.Metadata createMetadata(org.exoplatform.social.metadata.model.Metadata metadata)
    • updateMetadata

      public org.exoplatform.social.metadata.model.Metadata updateMetadata(org.exoplatform.social.metadata.model.Metadata metadata)
    • deleteMetadataById

      public org.exoplatform.social.metadata.model.Metadata deleteMetadataById(long id)
    • deleteMetadataItemsBySpaceId

      public int deleteMetadataItemsBySpaceId(long spaceId)
    • deleteMetadataItemsBySpaceIdAndAudienceId

      public int deleteMetadataItemsBySpaceIdAndAudienceId(long spaceId, long audienceId)
    • createMetadataItem

      public org.exoplatform.social.metadata.model.MetadataItem createMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem)
    • updateMetadataItem

      public org.exoplatform.social.metadata.model.MetadataItem updateMetadataItem(org.exoplatform.social.metadata.model.MetadataItem metadataItem)
    • getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemProperty

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndMetadataItemProperty(String metadataName, String metadataTypeName, String objectType, String propertyKey, String propertyValue, long offset, long limit)
    • getMetadataItemsByMetaDataTypeAndCreator

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetaDataTypeAndCreator(long metadataType, long creatorId, long offset, long limit)
    • countMetadataItemsByMetadataTypeAndCreator

      public int countMetadataItemsByMetadataTypeAndCreator(long metadataType, long creatorId)
    • countMetadataItemsByMetadataTypeAndAudienceId

      public Map<String,Long> countMetadataItemsByMetadataTypeAndAudienceId(long metadataType, long creatorId, long spaceId)
    • countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorId

      public Map<Long,Long> countMetadataItemsByMetadataTypeAndSpacesIdAndCreatorId(long metadataType, long creatorId, List<Long> spacesIds)
    • getMetadataItemsByMetadataNameAndTypeAndObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, long offset, long limit)
    • getMetadataItemsByMetadataNameAndTypeAndObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObject(String metadataName, String metadataTypeName, String objectType, String objectId, long offset, long limit)
    • getMetadataItemsByMetadataNameAndTypeAndSpaceIds

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndSpaceIds(String metadataName, String metadataTypeName, List<Long> spaceIds, long offset, long limit)
    • getMetadataItemsByFilter

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByFilter(org.exoplatform.social.metadata.MetadataFilter metadataFilter, long offset, long limit)
    • getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIds

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataNameAndTypeAndObjectAndSpaceIds(String metadataName, String metadataTypeName, String objectType, List<Long> spaceIds, long offset, long limit)
    • deleteMetadataItemById

      public org.exoplatform.social.metadata.model.MetadataItem deleteMetadataItemById(long id)
    • getMetadataItemById

      public org.exoplatform.social.metadata.model.MetadataItem getMetadataItemById(long itemId)
    • deleteMetadataItemsByObject

      public int deleteMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object)
    • deleteMetadataItemsByParentObject

      public int deleteMetadataItemsByParentObject(org.exoplatform.social.metadata.model.MetadataObject object)
    • deleteByMetadataItemsTypeAndUntilCreationDate

      public int deleteByMetadataItemsTypeAndUntilCreationDate(long metadataType, long untilDate)
    • deleteMetadataItemsByMetadataTypeAndObject

      public void deleteMetadataItemsByMetadataTypeAndObject(String metadataTypeName, org.exoplatform.social.metadata.model.MetadataObject object)
    • deleteByMetadataTypeAndSpaceIdAndCreatorId

      public List<org.exoplatform.social.metadata.model.MetadataItem> deleteByMetadataTypeAndSpaceIdAndCreatorId(long metadataType, long spaceId, long userIdentityId)
    • deleteByMetadataTypeAndCreatorId

      public List<org.exoplatform.social.metadata.model.MetadataItem> deleteByMetadataTypeAndCreatorId(long metadataType, long userIdentityId)
    • getMetadataItemsByObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByObject(org.exoplatform.social.metadata.model.MetadataObject object)
    • getMetadataItemsByMetadataTypeAndObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndObject(String metadataTypeName, org.exoplatform.social.metadata.model.MetadataObject object)
    • getMetadataNamesByObject

      public Set<String> getMetadataNamesByObject(org.exoplatform.social.metadata.model.MetadataObject object)
    • getMetadataNamesByAudiences

      public List<String> getMetadataNamesByAudiences(long metadataTypeId, Set<Long> audienceIds, long limit)
    • getMetadataNamesByCreator

      public List<String> getMetadataNamesByCreator(long metadataTypeId, Long creatorId, long limit)
    • getMetadataNamesByUser

      public List<String> getMetadataNamesByUser(long metadataTypeId, Long creatorId, Set<Long> audienceIds, long limit)
    • findMetadataNameByAudiencesAndQuery

      public List<String> findMetadataNameByAudiencesAndQuery(String term, long metadataTypeId, Set<Long> audienceIds, long limit)
    • findMetadataNameByCreatorAndQuery

      public List<String> findMetadataNameByCreatorAndQuery(String term, long metadataTypeId, long creatorId, long limit)
    • findMetadataNamesByUserAndQuery

      public List<String> findMetadataNamesByUserAndQuery(String term, long metadataTypeId, long creatorId, Set<Long> audienceIds, long limit)
    • getMetadataItemsByMetadataAndObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataAndObject(long metadataId, org.exoplatform.social.metadata.model.MetadataObject object)
    • getMetadataItemsByMetadataTypeAndObject

      public List<org.exoplatform.social.metadata.model.MetadataItem> getMetadataItemsByMetadataTypeAndObject(long metadataType, org.exoplatform.social.metadata.model.MetadataObject object)
    • getMetadataObjectIds

      public List<String> getMetadataObjectIds(String metadataTypeName, String metadataName, String objectType, long offset, long limit)
    • addMetadataType

      public void addMetadataType(org.exoplatform.social.metadata.model.MetadataType metadataType)
    • getMetadatas

      public List<org.exoplatform.social.metadata.model.Metadata> getMetadatas(String metadataTypeName, long limit)
    • getMetadataIdsByProperty

      public List<Long> getMetadataIdsByProperty(String propertyKey, String propertyValue, long offset, long limit, boolean orderByName)
    • countMetadataIdsByProperty

      public long countMetadataIdsByProperty(String propertyKey, String propertyValue)
    • getMetadataType

      public org.exoplatform.social.metadata.model.MetadataType getMetadataType(String name)
    • clearCaches

      public void clearCaches()
    • getMetadataTypes

      public List<org.exoplatform.social.metadata.model.MetadataType> getMetadataTypes()