Package org.apache.empire.db.exceptions

Examples of org.apache.empire.db.exceptions.InvalidKeyException


    public void loadRecord(Object[] recKey)
    {
        // Check Key
        if (recKey==null || recKey.length==0)
        {   // Invalid Record key
            throw new InvalidKeyException(rowset, recKey);
        }
        // Record laden
        record.read(rowset, recKey, action.getConnection());
        // Save Record Key Info
        persistOnSession();
View Full Code Here


    {
        try {
            // Check Key
            if (recKey==null || recKey.length==0)
            {   // Invalid Record Key
                throw new InvalidKeyException(rowset, recKey);
            }
            if (newRec)
            {   // Record has not been saved yet!
                record.close();
                return true;
View Full Code Here

    {
        try {
            // Check Key
            if (recKey==null || recKey.length==0)
            {   // Invalid Record key
                throw new InvalidKeyException(rowset, recKey);
            }
            // Prepare Update
            Connection conn = action.getConnection();
            initUpdateRecord(recKey, insert, conn);
            // Set Update Fields
View Full Code Here

    { // Get the record key
        DBColumn[] keyColumns = rowset.getKeyColumns();
        if (keyColumns == null || keyColumns.length < 1)
            throw new NoPrimaryKeyException(rowset);
        if (keyValues == null || keyValues.length != keyColumns.length)
            throw new InvalidKeyException(rowset, keyValues);
        // Get Persistent record
        if (persistence==SessionPersistence.Data)
        {   // Get the record from the session
            Record rec = getRecordFromSession();
            if (rec==null || (rec instanceof DBRecord)==false)
View Full Code Here

        if (primaryKey == null )
            throw new NoPrimaryKeyException(this); // Invalid Argument
        // Check Columns
        DBColumn[] keyColumns = primaryKey.getColumns();
        if (key == null || key.length != keyColumns.length)
            throw new InvalidKeyException(this, key); // Invalid Argument
        // Add the key constraints
        for (int i = 0; i < key.length; i++)
        {   // prepare key value
            Object value = key[i];
            if (db.isPreparedStatementsEnabled())
View Full Code Here

    {
        if (conn == null || rec == null)
            throw new InvalidArgumentException("conn|rec", null);
        DBColumn[] keyColumns = getKeyColumns();
        if (key == null || keyColumns.length != key.length)
            throw new InvalidKeyException(this, key);
        // Select
        DBCommand cmd = getCommandFromExpression();
        for (int i = 0; i < keyColumns.length; i++)
        {   // Set key column constraint
            Object value = key[i];
View Full Code Here

    {
        if (conn == null || rec == null)
            throw new InvalidArgumentException("conn|rec", null);
        DBColumn[] keyColumns = getKeyColumns();
        if (key == null || keyColumns.length != key.length)
            throw new InvalidKeyException(this, key);
        // Select
        DBCommand cmd = getCommandFromExpression();
        for (int i = 0; i < keyColumns.length; i++)
        {   // Set key column constraint
            Object value = key[i];
View Full Code Here

    public void loadRecord(Object[] recKey)
    {
        // Check Key
        if (recKey==null || recKey.length==0)
        {   // Invalid Record key
            throw new InvalidKeyException(rowset, recKey);
        }
        // Record laden
        record.read(rowset, recKey, action.getConnection());
        // Save Record Key Info
        persistOnSession();
View Full Code Here

    {
        try {
            // Check Key
            if (recKey==null || recKey.length==0)
            {   // Invalid Record Key
                throw new InvalidKeyException(rowset, recKey);
            }
            if (newRec)
            {   // Record has not been saved yet!
                record.close();
                return true;
View Full Code Here

    {
        try {
            // Check Key
            if (recKey==null || recKey.length==0)
            {   // Invalid Record key
                throw new InvalidKeyException(rowset, recKey);
            }
            // Prepare Update
            Connection conn = action.getConnection();
            initUpdateRecord(recKey, insert, conn);
            // Set Update Fields
View Full Code Here

TOP

Related Classes of org.apache.empire.db.exceptions.InvalidKeyException

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.