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

com.landawn.abacus.metadata.EntityDefinition Maven / Gradle / Ivy

The newest version!
/*
 * Copyright (C) 2015 HaiYang Li
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * 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. See the License for the specific language governing permissions and limitations under
 * the License.
 */

package com.landawn.abacus.metadata;

import java.util.List;
import java.util.Map;

import com.landawn.abacus.idGenerator.IdGenerator;

// TODO: Auto-generated Javadoc
/**
 *
 * @author Haiyang Li
 * @since 0.8
 */
public interface EntityDefinition {

    /**
     * Gets the name.
     *
     * @return
     */
    String getName();

    /**
     * Gets the table name.
     *
     * @return
     */
    String getTableName();

    /**
     * Gets the java type.
     *
     * @return
     */
    String getJavaType();

    /**
     * Gets the type class.
     *
     * @param 
     * @return
     */
     Class getTypeClass();

    /**
     * Gets the array type class.
     *
     * @param 
     * @return
     */
     Class getArrayTypeClass();

    /**
     * Gets the property list.
     *
     * @return
     */
    List getPropertyList();

    /**
     * Gets the property name list.
     *
     * @return
     */
    List getPropertyNameList();

    /**
     * Gets the property.
     *
     * @param propName
     * @return
     */
    Property getProperty(String propName);

    /**
     * Gets the id generator list.
     *
     * @return
     */
    List> getIdGeneratorList();

    /**
     * Gets the id generator.
     *
     * @param propName
     * @return
     */
    IdGenerator getIdGenerator(String propName);

    /**
     * Gets the id property list.
     *
     * @return
     */
    List getIdPropertyList();

    /**
     * Gets the id property name list.
     *
     * @return
     */
    List getIdPropertyNameList();

    /**
     * Gets the UID property list.
     *
     * @return
     */
    List getUIDPropertyList();

    /**
     * Gets the UID property name list.
     *
     * @return
     */
    List getUIDPropertyNameList();

    /**
     * Gets the entiy property list.
     *
     * @return
     */
    List getEntiyPropertyList();

    /**
     * Gets the default load property list.
     *
     * @return
     */
    List getDefaultLoadPropertyList();

    /**
     * Gets the default load property name list.
     *
     * @return
     */
    List getDefaultLoadPropertyNameList();

    /**
     * Gets the default on insert property list.
     *
     * @return
     */
    List getDefaultOnInsertPropertyList();

    /**
     * Gets the default on update property list.
     *
     * @return
     */
    List getDefaultOnUpdatePropertyList();

    /**
     * Checks if is id auto generated.
     *
     * @return true, if is id auto generated
     */
    boolean isIdAutoGenerated();

    /**
     * Checks if is slice entity.
     *
     * @return true, if is slice entity
     */
    boolean isSliceEntity();

    /**
     * Gets the slice entity list.
     *
     * @return
     */
    List getSliceEntityList();

    /**
     * Gets the attributes.
     *
     * @return
     */
    Map getAttributes();

    /**
     * Gets the attribute.
     *
     * @param attrName
     * @return
     */
    String getAttribute(String attrName);

    /**
     * Gets the parent entity.
     *
     * @return
     */
    EntityDefinition getParentEntity();

    /**
     * Gets the factory.
     *
     * @return
     */
    EntityDefinitionFactory getFactory();
}