All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class NamedQueryResourceEditor extends ResourceEditor<NamedQuery>
A tabbed resource editor for Named Queries
See Also:
  • Field Details

  • Method Details

    • init

      protected void init(NamedQuery query)
      Specified by:
      init in class ResourceEditor<NamedQuery>
    • setNamedQueryReadOnlyState

      public void setNamedQueryReadOnlyState(boolean isReadOnly)
    • updateSubEditorEnabledState

      protected void updateSubEditorEnabledState(boolean enabled)
    • deserialize

      protected NamedQuery deserialize(ProjectResource resource) throws Exception
      Description copied from class: ResourceEditor
      Deserialize a project resource into the editing object type for this editor. Default implementation simply calls this.deserialize(resource.getData()). Override this method if your resource does not use the default data.bin file.
      Overrides:
      deserialize in class ResourceEditor<NamedQuery>
      Throws:
      Exception
    • getObjectForSave

      protected NamedQuery getObjectForSave()
      Description copied from class: ResourceEditor
      Return the object that should be saved to represent this resource in the ProjectResource. Will be serialized using an XMLSerializer. Override save() to serialize in a different manner.
      Specified by:
      getObjectForSave in class ResourceEditor<NamedQuery>
    • serializeResource

      protected void serializeResource(ProjectResourceBuilder builder, NamedQuery object) throws Exception
      Description copied from class: ResourceEditor
      Serialize the object and put the serialized file(s) and attribute(s) into the project resource builder. Default implementation is:
      builder.putData(serialize(object));
      Implementations don't need to bother setting the project's resourcePath, projectName, or applicationScope; those will be set automatically.
      Overrides:
      serializeResource in class ResourceEditor<NamedQuery>
      Throws:
      Exception
    • getSelectedSubEditor

      public NamedQueryResourceEditor.NamedQuerySubEditor getSelectedSubEditor()
    • commit

      public void commit()
      Description copied from class: ResourceEditor
      Called when it's time to commit the resource being edited. Default implementation uses XML serialization. If you override, don't forget to call workspace.project().updateLock
      Overrides:
      commit in class ResourceEditor<NamedQuery>