org.apache.airavata.persistance.registry.jpa
Interface Resource

All Known Implementing Classes:
AbstractResource, ApplicationDescriptorResource, ConfigurationResource, ExecutionErrorResource, ExperimentDataResource, ExperimentMetadataResource, ExperimentResource, GatewayResource, GFacJobDataResource, GFacJobStatusResource, GramDataResource, HostDescriptorResource, NodeDataResource, ProjectResource, PublishWorkflowResource, ServiceDescriptorResource, UserResource, UserWorkflowResource, WorkerResource, WorkflowDataResource

public interface Resource


Method Summary
 Resource create(ResourceType type)
          This method will create associate resource objects for the given resource type.
 List<Resource> get(ResourceType type)
          This method will list all the child resources for the given resource type
 Resource get(ResourceType type, Object name)
          This method will return the given child resource from the database
 boolean isExists(ResourceType type, Object name)
          This method will check whether an entry from the given resource type and resource name exists in the database
 void remove(ResourceType type, Object name)
          This method will remove the given child resource from the database
 void save()
          This method will save the resource to the database.
 

Method Detail

create

Resource create(ResourceType type)
This method will create associate resource objects for the given resource type.

Parameters:
type - child resource type
Returns:
associate child resource

remove

void remove(ResourceType type,
            Object name)
This method will remove the given child resource from the database

Parameters:
type - child resource type
name - child resource name

get

Resource get(ResourceType type,
             Object name)
This method will return the given child resource from the database

Parameters:
type - child resource type
name - child resource name
Returns:
associate child resource

get

List<Resource> get(ResourceType type)
This method will list all the child resources for the given resource type

Parameters:
type - child resource type
Returns:
list of child resources of the given child resource type

save

void save()
This method will save the resource to the database.


isExists

boolean isExists(ResourceType type,
                 Object name)
This method will check whether an entry from the given resource type and resource name exists in the database

Parameters:
type - child resource type
name - child resource name
Returns:
whether the entry exists in the database or not


Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.