/**
 * Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U <br>
 * This file is part of FI-WARE project.
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License.
 * </p>
 * <p>
 * You may obtain a copy of the License at:<br>
 * <br>
 * http://www.apache.org/licenses/LICENSE-2.0
 * </p>
 * <p>
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * </p>
 * <p>
 * See the License for the specific language governing permissions and limitations under the License.
 * </p>
 * <p>
 * For those usages not covered by the Apache version 2.0 License please contact with opensource@tid.es
 * </p>
 */

package com.telefonica.euro_iaas.paasmanager.dao.impl;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import com.telefonica.euro_iaas.commons.dao.AbstractBaseDao;
import com.telefonica.euro_iaas.commons.dao.EntityNotFoundException;
import com.telefonica.euro_iaas.paasmanager.dao.MetadataDao;
import com.telefonica.euro_iaas.paasmanager.model.Metadata;

@Transactional(propagation = Propagation.REQUIRED)
public class MetadataDaoJpaImpl extends AbstractBaseDao<Metadata, String> implements MetadataDao {

    /*
     * Find all the attribute in paas-manager database
     * @return metadata, the list of attribute
     */
    public List<Metadata> findAll() {
        return super.findAll(Metadata.class);
    }

    /*
     * Find an attribute by name-searching
     * @param name, the name of the artifact
     * @return attribute, the attribute
     */
    public Metadata load(String name) throws EntityNotFoundException {
        return super.loadByField(Metadata.class, "name", name);
    }

}

@@ -1481,25 +1481,24 @@
 all the 
-attribute
+metadata
  in paas
@@ -1552,25 +1552,24 @@
 list of 
-attribute
+metadata
 %0A     */
@@ -1750,16 +1750,16 @@
 the 
-artifact
+metadata
 %0A   
@@ -1774,32 +1774,30 @@
 urn 
-attribute, the attribute
+metadata, the metadata
 %0A   

change comments