public class ReferentialService extends SgqService
config, daoHelper| Constructor and Description |
|---|
ReferentialService() |
| Modifier and Type | Method and Description |
|---|---|
void |
archiveProduct(Product product)
Archive product.
|
boolean |
canBeArchivedProduct(Product product)
Test if product is not currently used by a non expired batch to
be archived.
|
boolean |
canBeDeleteProduct(Product product)
Test if current product is not used into 'emplacements' and 'batch' table
to allow deletion.
|
void |
deleteAnalyzeCategory(AnalyzeCategory analyzeCategory) |
void |
deleteAnalyzeType(AnalyzeType analyzeType)
Delete analyze type.
|
void |
deleteProduct(Product product)
Delete product.
|
void |
deleteProductStatus(ProductStatus productStatus) |
List<AnalyzeCategory> |
findAllAnalyzeCategories()
Find all analyze categories.
|
Map<AnalyzeCategory,Long> |
findAllAnalyzeCategoriesWithCount()
Find all analyze categories with usage count.
|
List<AnalyzeType> |
findAllAnalyzeTypes()
Find all analyze types.
|
Map<AnalyzeType,Long> |
findAllAnalyzeTypesWithCount()
Find all analyze type with usage count.
|
List<String> |
findAllProductCategories()
Recherche parmis tous les produits les categories existantes.
|
List<ProductStatus> |
findAllProductStatus() |
Map<ProductStatus,Long> |
findAllProductStatusWithCount()
Find all product status with product count using this status.
|
AnalyzeCategory |
findAnalyzeCategoryById(String id) |
AnalyzeType |
findAnalyzeTypeById(String id)
Find single analyze types by id.
|
Client |
findClientById(String id) |
List<Supplier> |
getAllSupplierOnlyLabs()
Return all suppliers (laboratory first).
|
List<Client> |
getClients(int offset,
int count)
Get clients ordered by code.
|
long |
getClientsCount() |
protected Place |
getPlaceByCode(String code)
Utile seulement pour les tests.
|
Place |
getPlaceById(String placeId) |
List<Place> |
getPlaces()
Get places ordered by code.
|
List<Place> |
getPlaces(Zone zone)
Get places ordered by code for zone.
|
long |
getPlacesCount() |
Product |
getProductById(String productId) |
org.apache.commons.lang3.tuple.Pair<List<Product>,Long> |
getProducts(ProductSearchModel search,
int offset,
int count)
Get product ordered by code.
|
InputStream |
getProductsAsCsv(ProductSearchModel search)
Get product export as csv
|
long |
getProductsCount() |
ProductStatus |
getProductStatusById(String productStatusId) |
Supplier |
getSupplierById(String supplierId)
Get supplier by topia id.
|
List<Supplier> |
getSuppliers(int offset,
int count)
Get suppliers ordered by code.
|
long |
getSuppliersCount() |
List<ImportLog<Client>> |
importClients(File file)
Import client dbf file.
|
List<ImportLog<Place>> |
importPlaces(File file)
Import place csv file.
|
List<ImportLog<Product>> |
importProducts(File file) |
List<ImportLog<Supplier>> |
importSuppliers(File file)
Import suppliers dbf file.
|
void |
saveAnalyzeCategory(AnalyzeCategory analyzeCategory)
Save (create or update) analyze category.
|
void |
saveAnalyzeType(AnalyzeType analyzeType)
Save (create or update) analyze type.
|
void |
saveClient(Client client) |
void |
saveProduct(Product product,
String productStatusName) |
void |
unArchiveProduct(Product product)
Unarchive product.
|
setConfig, setServiceDAOHelperpublic List<ImportLog<Client>> importClients(File file)
file - dbf filepublic List<ImportLog<Place>> importPlaces(File file)
file - csv filepublic List<ImportLog<Supplier>> importSuppliers(File file)
file - dbf filepublic long getClientsCount()
public List<Client> getClients(int offset, int count)
offset - offsetcount - countpublic void saveClient(Client client)
public long getPlacesCount()
public List<Place> getPlaces(Zone zone)
zone - zone filterprotected Place getPlaceByCode(String code)
code - place codepublic long getSuppliersCount()
public List<Supplier> getSuppliers(int offset, int count)
offset - offsetcount - countpublic Supplier getSupplierById(String supplierId)
offset - offsetcount - countpublic long getProductsCount()
public org.apache.commons.lang3.tuple.Pair<List<Product>,Long> getProducts(ProductSearchModel search, int offset, int count)
search - search product search modeloffset - offsetcount - countpublic InputStream getProductsAsCsv(ProductSearchModel search)
search - search product search modelpublic boolean canBeDeleteProduct(Product product)
product - product to testtrue if product can be deletepublic boolean canBeArchivedProduct(Product product)
product - product to testtrue if product can be deletepublic void deleteProduct(Product product)
product - product to deletepublic void archiveProduct(Product product)
product - product to deletepublic void unArchiveProduct(Product product)
product - product to deletepublic List<AnalyzeType> findAllAnalyzeTypes()
public Map<AnalyzeType,Long> findAllAnalyzeTypesWithCount()
public AnalyzeType findAnalyzeTypeById(String id)
public void deleteAnalyzeType(AnalyzeType analyzeType)
public void saveAnalyzeType(AnalyzeType analyzeType)
public void saveAnalyzeCategory(AnalyzeCategory analyzeCategory)
public List<AnalyzeCategory> findAllAnalyzeCategories()
public Map<AnalyzeCategory,Long> findAllAnalyzeCategoriesWithCount()
public AnalyzeCategory findAnalyzeCategoryById(String id)
public void deleteAnalyzeCategory(AnalyzeCategory analyzeCategory)
public List<Supplier> getAllSupplierOnlyLabs()
public List<ProductStatus> findAllProductStatus()
public Map<ProductStatus,Long> findAllProductStatusWithCount()
public ProductStatus getProductStatusById(String productStatusId)
public void deleteProductStatus(ProductStatus productStatus)
Copyright © 2012-2013 Herboristerie Cailleau. All Rights Reserved.