All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.eclipse.jnosql.mapping.metamodel.DefaultAttribute Maven / Gradle / Ivy

The newest version!
/*
 *  Copyright (c) 2022 Contributors to the Eclipse Foundation
 *   All rights reserved. This program and the accompanying materials
 *   are made available under the terms of the Eclipse Public License v1.0
 *   and Apache License v2.0 which accompanies this distribution.
 *   The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
 *   and the Apache License v2.0 is available at http://www.opensource.org/licenses/apache2.0.php.
 *
 *   You may elect to redistribute this code under either of these licenses.
 *
 *   Contributors:
 *
 *   Alessandro Moscatelli
 */
package org.eclipse.jnosql.mapping.metamodel;

import org.eclipse.jnosql.mapping.metamodel.api.Attribute;
import org.eclipse.jnosql.mapping.AbstractGenericType;

/**
 * Default metamodel attribute implementation
 * @param  The Entity type the attribute belongs to
 * @param  The attribute type
 */
public abstract class DefaultAttribute extends AbstractGenericType implements Attribute {

    private final Class attributeType;
    private final String name;
    
    public DefaultAttribute(Class type, Class attributeType, String name) {
        super(type);
        this.attributeType = attributeType;
        this.name = name;
    }

    @Override
    public String getName() {
        return this.name;
    }

    @Override
    public Class getAttributeType() {
        return attributeType;
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy