Package ru.curs.celesta.score
Class CelestaSerializer
- java.lang.Object
-
- ru.curs.celesta.score.CelestaSerializer
-
public final class CelestaSerializer extends Object
Serializes grain and its components to CelestaSQL.The class name reflects its counterpart -
CelestaParser
- Since:
- 2019-03-07
- Author:
- Pavel Perminov (packpaul@mail.ru)
-
-
Constructor Summary
Constructors Constructor Description CelestaSerializer(PrintWriter writer)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
save(Grain grain)
Serializes grain to its CelestaSQL representation.void
save(GrainPart gp)
Serializes grain part to its CelestaSQL representation.static String
toQueryString(View v)
Returns a query based on which the view is going to be created.
-
-
-
Constructor Detail
-
CelestaSerializer
public CelestaSerializer(PrintWriter writer)
-
-
Method Detail
-
toQueryString
public static String toQueryString(View v) throws IOException
Returns a query based on which the view is going to be created.- Parameters:
v
- view- Returns:
- Throws:
IOException
- if query creation fails
-
save
public void save(GrainPart gp) throws IOException
Serializes grain part to its CelestaSQL representation.- Parameters:
gp
- grain part- Throws:
IOException
- if serialization fails
-
save
public void save(Grain grain) throws IOException
Serializes grain to its CelestaSQL representation.- Parameters:
grain
- grain- Throws:
IOException
- if serialization fails
-
-