Subversion Repositories SmartDukaan

Rev

Rev 4496 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
3374 rajveer 1
namespace java in.shop2020.generic
2
namespace py shop2020.thriftpy.generic
3
 
4496 mandeep.dh 4
enum ExceptionType {
5
    NULL_POINTER = 101,
6
    ILLEGAL_ARGUMENTS = 102,
7
    DATABASE_ERROR = 103,
4846 mandeep.dh 8
    NOT_AUTHORIZED = 104,
9
    MULTIPLE_ITEMS_FOUND = 105 // In the message we pass the comma separated item ids
4496 mandeep.dh 10
}
11
 
12
const map<ExceptionType, string> EXCEPTION_TYPES_DESCRIPTION = {
13
    ExceptionType.NULL_POINTER : "Null pointer exception",
14
    ExceptionType.ILLEGAL_ARGUMENTS : "Illegal arguments, could not lookup",
15
    ExceptionType.DATABASE_ERROR : "Error in the DB layer",
4846 mandeep.dh 16
    ExceptionType.NOT_AUTHORIZED : "Not authorized",
17
    ExceptionType.MULTIPLE_ITEMS_FOUND : "Multiple items found"
4496 mandeep.dh 18
};
19
 
3374 rajveer 20
service GenericService{
21
	/**
22
	* For checking weather service is active alive or not. It also checks connectivity with database
23
	*/
24
	bool isAlive(),
25
 
26
	/**
27
	* For closing the open session in sqlalchemy
28
	*/
29
	void closeSession()
4496 mandeep.dh 30
}