org.jtheque.books.services.impl
Class EditorsService

java.lang.Object
  extended by org.jtheque.books.services.impl.EditorsService
All Implemented Interfaces:
IEditorsService, org.jtheque.core.managers.persistence.able.DataContainer<Editor>

public final class EditorsService
extends Object
implements IEditorsService

An editors service implementation.

Author:
Baptiste Wicht

Field Summary
 
Fields inherited from interface org.jtheque.books.services.able.IEditorsService
DATA_TYPE
 
Constructor Summary
EditorsService()
           
 
Method Summary
 void addDataListener(org.jtheque.core.managers.persistence.able.DataListener listener)
           
 void clearAll()
           
 void create(Editor editor)
          Create the editor.
 boolean delete(Editor editor)
          Delete the editor.
 boolean exists(String name)
          Indicate if exists an editor with a name.
 Collection<Editor> getDatas()
           
 String getDataType()
           
 Editor getDefaultEditor()
          Return the default editor.
 Editor getEditor(String name)
          Return the editor with the name.
 Editor getEmptyEditor()
          Create an empty editor.
 void save(Editor editor)
          Save the editor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EditorsService

public EditorsService()
Method Detail

getDefaultEditor

@Transactional
public Editor getDefaultEditor()
Description copied from interface: IEditorsService
Return the default editor.

Specified by:
getDefaultEditor in interface IEditorsService
Returns:
The default editor.

create

@Transactional
public void create(Editor editor)
Description copied from interface: IEditorsService
Create the editor.

Specified by:
create in interface IEditorsService
Parameters:
editor - The editor to create.

getEditor

public Editor getEditor(String name)
Description copied from interface: IEditorsService
Return the editor with the name.

Specified by:
getEditor in interface IEditorsService
Parameters:
name - The name to search for.
Returns:
The editor.

exists

public boolean exists(String name)
Description copied from interface: IEditorsService
Indicate if exists an editor with a name.

Specified by:
exists in interface IEditorsService
Parameters:
name - The name to search for.
Returns:
true if the author exists else false.

delete

@Transactional
public boolean delete(Editor editor)
Description copied from interface: IEditorsService
Delete the editor.

Specified by:
delete in interface IEditorsService
Parameters:
editor - The editor to delete.
Returns:
true if the editor has been deleted else false.

save

@Transactional
public void save(Editor editor)
Description copied from interface: IEditorsService
Save the editor.

Specified by:
save in interface IEditorsService
Parameters:
editor - The editor to save.

getEmptyEditor

public Editor getEmptyEditor()
Description copied from interface: IEditorsService
Create an empty editor.

Specified by:
getEmptyEditor in interface IEditorsService
Returns:
An empty editor, not persisted.

getDatas

public Collection<Editor> getDatas()
Specified by:
getDatas in interface org.jtheque.core.managers.persistence.able.DataContainer<Editor>

addDataListener

public void addDataListener(org.jtheque.core.managers.persistence.able.DataListener listener)
Specified by:
addDataListener in interface org.jtheque.core.managers.persistence.able.DataContainer<Editor>

clearAll

@Transactional
public void clearAll()
Specified by:
clearAll in interface org.jtheque.core.managers.persistence.able.DataContainer<Editor>

getDataType

public String getDataType()
Specified by:
getDataType in interface org.jtheque.core.managers.persistence.able.DataContainer<Editor>


Copyright © 2010 JTheque. All Rights Reserved.