415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell/*
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * The contents of this file are subject to the terms of the Common Development and
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * Distribution License (the License). You may not use this file except in compliance with the
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * License.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell *
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * specific language governing permission and limitations under the License.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell *
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * When distributing Covered Software, include this CDDL Header Notice in each file and include
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * Header, with the fields enclosed by brackets [] replaced by your own identifying
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * information: "Portions copyright [year] [name of copyright owner]".
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell *
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * Copyright 2016 ForgeRock AS.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell */
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell#import "FRAModelObject.h"
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell/*!
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * Extension interface for FRAModelObject defining protected properties and methods that should only be accessible
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * to subclasses and the FRAIdentityDatabase.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell */
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell@interface FRAModelObject ()
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell/*!
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell * The database to which this object is persisted.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell */
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell@property (nonatomic, strong) FRAIdentityDatabase* database;
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell/*!
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott * Indicates whether this model object has been persisted to the database.
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott * YES indicates it has been stored, NO indicates it has not yet been stored.
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott *
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott * NB: This property only indicates whether or not a record has been persisted. It
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott * does not indicate whether or not this object is dirty and has unsaved changes.
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell */
55abfb9b58693eddac5205e74aac84f50c9798d2Robert Wapshott@property (nonatomic, getter=isStored) BOOL stored;
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell
415243fbc81341293a852ff6aa14e9608d08685cCraig McDonnell@end