Class MetadataSchemaDAOImpl

  • All Implemented Interfaces:
    MetadataSchemaDAO, GenericDAO<MetadataSchema>

    public class MetadataSchemaDAOImpl
    extends AbstractHibernateDAO<MetadataSchema>
    implements MetadataSchemaDAO
    Hibernate implementation of the Database Access Object interface class for the MetadataSchema object. This class is responsible for all database calls for the MetadataSchema object and is autowired by spring This class should never be accessed directly.
    Author:
    kevinvandevelde at atmire.com
    • Constructor Detail

      • MetadataSchemaDAOImpl

        protected MetadataSchemaDAOImpl()
    • Method Detail

      • uniqueNamespace

        public boolean uniqueNamespace​(Context context,
                                       int metadataSchemaId,
                                       String namespace)
                                throws SQLException
        Return true if and only if the passed name appears within the allowed number of times in the current schema.
        Specified by:
        uniqueNamespace in interface MetadataSchemaDAO
        Parameters:
        context - DSpace context
        metadataSchemaId - schema id
        namespace - namespace URI to match
        Returns:
        true of false
        Throws:
        SQLException - if database error
      • uniqueShortName

        public boolean uniqueShortName​(Context context,
                                       int metadataSchemaId,
                                       String name)
                                throws SQLException
        Return true if and only if the passed name is unique.
        Specified by:
        uniqueShortName in interface MetadataSchemaDAO
        Parameters:
        context - DSpace context
        metadataSchemaId - schema id
        name - short name of schema
        Returns:
        true of false
        Throws:
        SQLException - if database error
      • find

        public MetadataSchema find​(Context context,
                                   String shortName)
                            throws SQLException
        Get the schema corresponding with this short name.
        Specified by:
        find in interface MetadataSchemaDAO
        Parameters:
        context - context, in case we need to read it in from DB
        shortName - the short name for the schema
        Returns:
        the metadata schema object
        Throws:
        SQLException - if database error