Class 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 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