edu.internet2.middleware.grouper.attr
Class AttributeDefNameSave

java.lang.Object
  extended by edu.internet2.middleware.grouper.attr.AttributeDefNameSave

public class AttributeDefNameSave
extends Object

Use this class to insert or update a attribute def name


Constructor Summary
AttributeDefNameSave(GrouperSession theGrouperSession, AttributeDef theAttributeDef)
          create a new attribute def name save
 
Method Summary
 AttributeDefNameSave assignAttributeDefNameNameToEdit(String theAttributeDefNameNameToEdit)
          attributeDefName name to edit
 AttributeDefNameSave assignCreateParentStemsIfNotExist(boolean theCreateParentStemsIfNotExist)
          assign create parents if not exist
 AttributeDefNameSave assignDescription(String theDescription)
          assign description
 AttributeDefNameSave assignDisplayExtension(String theDisplayExtension)
          display extension
 AttributeDefNameSave assignDisplayName(String theDisplayName)
           
 AttributeDefNameSave assignIdIndex(Long theIdIndex)
          assign id_index
 AttributeDefNameSave assignName(String name1)
          name
 AttributeDefNameSave assignSaveMode(SaveMode theSaveMode)
          assign save mode
 AttributeDefNameSave assignUuid(String theId)
          id
 SaveResultType getSaveResultType()
          get the save type
 AttributeDefName save()
           create or update a attributeDefName.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AttributeDefNameSave

public AttributeDefNameSave(GrouperSession theGrouperSession,
                            AttributeDef theAttributeDef)
create a new attribute def name save

Parameters:
theGrouperSession -
theAttributeDef -
Method Detail

assignIdIndex

public AttributeDefNameSave assignIdIndex(Long theIdIndex)
assign id_index

Parameters:
theIdIndex -
Returns:
this for chaining

assignAttributeDefNameNameToEdit

public AttributeDefNameSave assignAttributeDefNameNameToEdit(String theAttributeDefNameNameToEdit)
attributeDefName name to edit

Parameters:
theAttributeDefNameNameToEdit -
Returns:
the attributeDefName name to edit

assignUuid

public AttributeDefNameSave assignUuid(String theId)
id

Parameters:
theId -
Returns:
uuid

assignDisplayName

public AttributeDefNameSave assignDisplayName(String theDisplayName)
Parameters:
theDisplayName -
Returns:
this for chaining

assignName

public AttributeDefNameSave assignName(String name1)
name

Parameters:
name1 -
Returns:
name

assignDisplayExtension

public AttributeDefNameSave assignDisplayExtension(String theDisplayExtension)
display extension

Parameters:
theDisplayExtension -
Returns:
this for chaining

assignDescription

public AttributeDefNameSave assignDescription(String theDescription)
assign description

Parameters:
theDescription -
Returns:
this for chaining

assignSaveMode

public AttributeDefNameSave assignSaveMode(SaveMode theSaveMode)
assign save mode

Parameters:
theSaveMode -
Returns:
this for chaining

assignCreateParentStemsIfNotExist

public AttributeDefNameSave assignCreateParentStemsIfNotExist(boolean theCreateParentStemsIfNotExist)
assign create parents if not exist

Parameters:
theCreateParentStemsIfNotExist -
Returns:
this for chaining

getSaveResultType

public SaveResultType getSaveResultType()
get the save type

Returns:
save type

save

public AttributeDefName save()
                      throws StemNotFoundException,
                             InsufficientPrivilegeException,
                             StemAddException
 create or update a attributeDefName.  Note this will not rename an attributeDefName at this time (might in future)
 
 This is a static method since setters to AttributeDefName objects persist to the DB
 
 Steps:
 
 1. Find the attributeDefName by attributeDefNameNameToEdit
 2. Internally set all the fields of the attributeDefName (no need to reset if already the same)
 3. Store the attributeDefName (insert or update) if needed
 4. Return the attributeDefName object
 
 This runs in a tx so that if part of it fails the whole thing fails, and potentially the outer
 transaction too
 

Returns:
the attributeDefName
Throws:
StemNotFoundException
InsufficientPrivilegeException
StemAddException