Package org.datanucleus.metadata

Examples of org.datanucleus.metadata.ForeignKeyAction


        if (fkmd.getName() != null)
        {
            setName(fkmd.getName());
        }

        ForeignKeyAction deleteAction = fkmd.getDeleteAction();
        if (deleteAction != null)
        {
            if (deleteAction.equals(ForeignKeyAction.CASCADE))
            {
                setDeleteAction(FKAction.CASCADE);
            }
            else if (deleteAction.equals(ForeignKeyAction.RESTRICT))
            {
                setDeleteAction(FKAction.RESTRICT);
            }
            else if (deleteAction.equals(ForeignKeyAction.NULL))
            {
                setDeleteAction(FKAction.NULL);
            }
            else if (deleteAction.equals(ForeignKeyAction.DEFAULT))
            {
                setDeleteAction(FKAction.DEFAULT);
            }
        }

        ForeignKeyAction updateAction = fkmd.getUpdateAction();
        if (updateAction != null)
        {
            if (updateAction.equals(ForeignKeyAction.CASCADE))
            {
                setUpdateAction(FKAction.CASCADE);
            }
            else if (updateAction.equals(ForeignKeyAction.RESTRICT))
            {
                setUpdateAction(FKAction.RESTRICT);
            }
            else if (updateAction.equals(ForeignKeyAction.NULL))
            {
                setUpdateAction(FKAction.NULL);
            }
            else if (updateAction.equals(ForeignKeyAction.DEFAULT))
            {
                setUpdateAction(FKAction.DEFAULT);
            }
        }
View Full Code Here

TOP

Related Classes of org.datanucleus.metadata.ForeignKeyAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.