org.wso2.registry.jdbc.dao
Class ArtifactDAO

java.lang.Object
  extended by org.wso2.registry.jdbc.dao.ArtifactDAO

public class ArtifactDAO
extends java.lang.Object


Constructor Summary
ArtifactDAO()
           
 
Method Summary
 void add(java.lang.String path, Artifact artifact, java.sql.Connection conn)
          Adds the given artifact to the database.
 void addChild(long parentID, long childID, java.sql.Connection conn)
           
 void addProperties(long artifactID, java.util.Properties props, java.sql.Connection conn)
           
 boolean artifactExist(java.lang.String path, java.sql.Connection conn)
           
 void delete(java.lang.String path, java.sql.Connection conn)
           
 void deleteByID(long id, java.sql.Connection conn)
           
 Artifact get(java.lang.String path, java.sql.Connection conn)
           
 Artifact get(java.lang.String path, long versionNumber, java.sql.Connection conn)
           
 Artifact getArtifactByID(long artifactID, long versionNumber, java.sql.Connection conn)
           
 long getArtifactID(java.lang.String path, java.sql.Connection conn)
           
 java.util.List getChildren(long parentID, java.sql.Connection conn)
           
 java.util.List getChildren(long artifcatID, long versionNumber, java.sql.Connection connection)
           
 Artifact getLatestVersion(java.lang.String path, java.sql.Connection conn)
           
 void markDeleted(java.lang.String path, java.sql.Connection conn)
           
 void removeChildRelationship(long childID, java.sql.Connection conn)
           
 void removeProperties(long artifactID, java.sql.Connection conn)
           
 void update(java.lang.String path, Artifact artifact, java.sql.Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ArtifactDAO

public ArtifactDAO()
Method Detail

get

public Artifact get(java.lang.String path,
                    java.sql.Connection conn)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

get

public Artifact get(java.lang.String path,
                    long versionNumber,
                    java.sql.Connection conn)
             throws java.sql.SQLException
Throws:
java.sql.SQLException

getArtifactByID

public Artifact getArtifactByID(long artifactID,
                                long versionNumber,
                                java.sql.Connection conn)
                         throws java.sql.SQLException
Throws:
java.sql.SQLException

getLatestVersion

public Artifact getLatestVersion(java.lang.String path,
                                 java.sql.Connection conn)
                          throws java.sql.SQLException
Throws:
java.sql.SQLException

add

public void add(java.lang.String path,
                Artifact artifact,
                java.sql.Connection conn)
         throws java.sql.SQLException
Adds the given artifact to the database.

Parameters:
path - Path of the new artifact
artifact - New artifact
Throws:
java.sql.SQLException

update

public void update(java.lang.String path,
                   Artifact artifact,
                   java.sql.Connection conn)
            throws java.sql.SQLException
Throws:
java.sql.SQLException

delete

public void delete(java.lang.String path,
                   java.sql.Connection conn)
            throws java.sql.SQLException
Throws:
java.sql.SQLException

deleteByID

public void deleteByID(long id,
                       java.sql.Connection conn)
                throws java.sql.SQLException
Throws:
java.sql.SQLException

markDeleted

public void markDeleted(java.lang.String path,
                        java.sql.Connection conn)
                 throws java.sql.SQLException
Throws:
java.sql.SQLException

addChild

public void addChild(long parentID,
                     long childID,
                     java.sql.Connection conn)
              throws java.sql.SQLException
Throws:
java.sql.SQLException

removeChildRelationship

public void removeChildRelationship(long childID,
                                    java.sql.Connection conn)
                             throws java.sql.SQLException
Throws:
java.sql.SQLException

getChildren

public java.util.List getChildren(long parentID,
                                  java.sql.Connection conn)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

getChildren

public java.util.List getChildren(long artifcatID,
                                  long versionNumber,
                                  java.sql.Connection connection)
                           throws java.sql.SQLException
Throws:
java.sql.SQLException

addProperties

public void addProperties(long artifactID,
                          java.util.Properties props,
                          java.sql.Connection conn)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException

removeProperties

public void removeProperties(long artifactID,
                             java.sql.Connection conn)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

artifactExist

public boolean artifactExist(java.lang.String path,
                             java.sql.Connection conn)
                      throws java.sql.SQLException
Throws:
java.sql.SQLException

getArtifactID

public long getArtifactID(java.lang.String path,
                          java.sql.Connection conn)
                   throws java.sql.SQLException
Throws:
java.sql.SQLException


Copyright © 2007 Apache Web Services Project. All Rights Reserved.