org.wso2.registry.jdbc.dao
Class ResourceDAO

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

public class ResourceDAO
extends java.lang.Object


Constructor Summary
ResourceDAO()
           
 
Method Summary
 void add(java.lang.String path, Resource resource, java.sql.Connection conn)
          Adds the given resource 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)
           
 Resource get(java.lang.String path, java.sql.Connection conn)
           
 Resource get(java.lang.String path, long versionNumber, java.sql.Connection conn)
           
 Resource 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)
           
 Resource 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, Resource resource, java.sql.Connection conn)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceDAO

public ResourceDAO()
Method Detail

get

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

get

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

getArtifactByID

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

getLatestVersion

public Resource 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,
                Resource resource,
                java.sql.Connection conn)
         throws java.sql.SQLException
Adds the given resource to the database.

Parameters:
path - Path of the new resource
resource - New resource
conn - : Connection to DB
Throws:
java.sql.SQLException

update

public void update(java.lang.String path,
                   Resource resource,
                   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.