001 package com.sptci.prevayler;
002
003 import java.io.Serializable;
004
005 /**
006 * A value object used to store persistent metadata for a {@link
007 * PrevalentObject}.
008 *
009 * <p>© Copyright 2008 <a href='http://sptci.com/' target='_top'>Sans
010 * Pareil Technologies, Inc.</a></p>
011 *
012 * @author Rakesh Vidyadharan 2008-06-28
013 * @version $Id: MetaData.java 4345 2008-06-30 21:22:03Z rakesh $
014 */
015 class MetaData implements Serializable
016 {
017 private static final long serialVersionUID = 1l;
018
019 /** A field used to maintain the persistent state of an object. */
020 final boolean persisted;
021
022 /** A field used to store the date-time at which an object was created. */
023 final long created;
024
025 /** A field used to store the date-time at which an object was last saved. */
026 long modified;
027
028 /**
029 * Create a new meta data instance. Sets the field values to the specified
030 * values.
031 *
032 * @param time The datetime at which the transaction was created.
033 */
034 MetaData( final long time )
035 {
036 persisted = true;
037 created = time;
038 modified = time;
039 }
040 }