mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Moved the tracking of newly introduced nodes into its own table. Simplifies things a bit.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3320 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -35,21 +35,11 @@ public abstract class AVMNodeImpl implements AVMNode, Serializable
|
||||
*/
|
||||
private int fVersionID;
|
||||
|
||||
/**
|
||||
* The Repository that owns this.
|
||||
*/
|
||||
private Repository fRepository;
|
||||
|
||||
/**
|
||||
* The basic attributes of this. Owner, creator, mod time, etc.
|
||||
*/
|
||||
private BasicAttributes fBasicAttributes;
|
||||
|
||||
/**
|
||||
* Whether this node is new (and should therefore not be COWed).
|
||||
*/
|
||||
private boolean fIsNew;
|
||||
|
||||
/**
|
||||
* The version number (for concurrency control).
|
||||
*/
|
||||
@@ -77,16 +67,14 @@ public abstract class AVMNodeImpl implements AVMNode, Serializable
|
||||
{
|
||||
fID = id;
|
||||
fVersionID = -1;
|
||||
fRepository = repo;
|
||||
fIsRoot = false;
|
||||
long time = System.currentTimeMillis();
|
||||
fBasicAttributes = new BasicAttributesImpl("britt",
|
||||
"britt",
|
||||
"britt",
|
||||
time,
|
||||
time,
|
||||
time);
|
||||
fIsNew = true;
|
||||
"britt",
|
||||
"britt",
|
||||
time,
|
||||
time,
|
||||
time);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -139,24 +127,6 @@ public abstract class AVMNodeImpl implements AVMNode, Serializable
|
||||
return AVMContext.fgInstance.fAVMNodeDAO.getMergedFrom(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the owning repository for this.
|
||||
* @param repo The owning repository.
|
||||
*/
|
||||
public void setRepository(Repository repo)
|
||||
{
|
||||
fRepository = repo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the repository that owns this.
|
||||
* @return The repository.
|
||||
*/
|
||||
public Repository getRepository()
|
||||
{
|
||||
return fRepository;
|
||||
}
|
||||
|
||||
/**
|
||||
* Equality based on object ids.
|
||||
* @param obj The thing to compare against.
|
||||
@@ -241,22 +211,13 @@ public abstract class AVMNodeImpl implements AVMNode, Serializable
|
||||
return fBasicAttributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set whether this is new.
|
||||
* @param isNew Whether this is new.
|
||||
*/
|
||||
public void setIsNew(boolean isNew)
|
||||
{
|
||||
fIsNew = isNew;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether this is a new node.
|
||||
* @return Whether this is new.
|
||||
*/
|
||||
public boolean getIsNew()
|
||||
{
|
||||
return fIsNew;
|
||||
return AVMContext.fgInstance.fNewInRepositoryDAO.getByNode(this) != null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user