Package org.apache.empire.data

Examples of org.apache.empire.data.Record


        return action.getRecordKeyString(record);
    }
   
    public boolean isNewRecord()
    {
        Record record = getRecord();
        if (record==null || record.isValid()==false)
        {   // Check whether we can get the record key from the request or the session
            String property = getRecordPropertyName();
            String key = getActionParam(property, persistence==SessionPersistence.Key);
            if (key!=null)
                return action.getRecordNewFlagFromString(key); // Return key or null
            if (persistence!=SessionPersistence.Data)
                return false; // Unknown
            // Get Record from the session
            record = getRecordFromSession();
            if (record==null)
                return false; // No Record Provided
            // We have a record
            // setRecord(record);
        }
        return record.isNew();
    }
View Full Code Here


     */
    @Override
    public boolean loadFormData()
    {
        try {
            Record record = getRecord();
            if (record.isValid()==false)
                throw new ObjectNotValidException(record);
            // Load Data
            return setUpdateFields(record);

        } catch(Exception e) {
View Full Code Here

                loadRecord(key);
            }
            // Data persistence
            case Data:
            {   // get record object from session
                Record rec = getRecordFromSession();
                if (rec!=null && (rec instanceof DBRecord))
                {   // Check rowset
                    if (((DBRecord)rec).getRowSet()!=rowset)
                        throw new ObjectNotValidException(rec);
                    // Record restored
View Full Code Here

        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)
            {   // Record restored
                throw new InvalidFormDataException();
            }
            // Record not found
View Full Code Here

    public abstract Record getRecord();

    public String getRecordKeyString()
    {
        Record record = getRecord();
        if (record==null || record.isValid()==false)
        {   // Check whether we can get the record key from the request or the session
            String property = getRecordPropertyName();
            String key = getActionParam(property, persistence==SessionPersistence.Key);
            if (key!=null || (persistence!=SessionPersistence.Data))
                return key; // Return key or null
View Full Code Here

            if (isRecordReadOnly())
                return true;
            // Check Record
            if ((getRecord() instanceof Record))
            { // Ask Record
                Record r = (Record) record;
                return r.isFieldReadOnly(getColumn());
            }
            // column
            return getColumn().isReadOnly();
        }
View Full Code Here

        if (this.record!=null && (getTagAttributeValue("record") instanceof Record))
            this.record=null;
        // Check Record
        if ((getRecord() instanceof Record))
        { // Ask Record
            Record r = (Record) record;
            return r.isFieldVisible(getColumn());
        }
        // column
        return true;
    }
View Full Code Here

        if (isRecordReadOnly())
            return true;
        // Check Record
        if ((getRecord() instanceof Record))
        { // Ask Record
            Record r = (Record) record;
            return r.isFieldReadOnly(getColumn());
        }
        // column
        return getColumn().isReadOnly();
    }
View Full Code Here

        if (isReadOnly())
            return false;
        // Check Record
        if ((getRecord() instanceof Record))
        {   // Ask Record
            Record r = (Record) record;
            return r.isFieldRequired(getColumn());
        }
        // Check Value Attribute
        if (hasValueExpression())
            return false;
        // Required
View Full Code Here

     */
    @Override
    public boolean loadFormData()
    {
        try {
            Record record = getRecord();
            if (record.isValid()==false)
                throw new ObjectNotValidException(record);
            // Load Data
            return setUpdateFields(record);

        } catch(Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.empire.data.Record

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.