mirror of
https://github.com/postgres/postgres.git
synced 2025-08-28 18:48:04 +03:00
JDBC indenting, comment cleanups.
This commit is contained in:
@@ -4,17 +4,17 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This represents the box datatype within org.postgresql.
|
||||
*/
|
||||
public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* These are the two points.
|
||||
*/
|
||||
public PGpoint point[] = new PGpoint[2];
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param x1 first x coordinate
|
||||
* @param y1 first y coordinate
|
||||
* @param x2 second x coordinate
|
||||
@@ -27,7 +27,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
this.point[1] = new PGpoint(x2, y2);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param p1 first point
|
||||
* @param p2 second point
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
this.point[1] = p2;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Box definition in PostgreSQL syntax
|
||||
* @exception SQLException if definition is invalid
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Required constructor
|
||||
*/
|
||||
public PGbox()
|
||||
@@ -56,7 +56,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
setType("box");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This method sets the value of this object. It should be overidden,
|
||||
* but still called by subclasses.
|
||||
*
|
||||
@@ -73,7 +73,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
point[1] = new PGpoint(t.getToken(1));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -96,7 +96,7 @@ public class PGbox extends PGobject implements Serializable, Cloneable
|
||||
return new PGbox((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGbox in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
@@ -4,23 +4,23 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This represents org.postgresql's circle datatype, consisting of a point and
|
||||
* a radius
|
||||
*/
|
||||
public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* This is the centre point
|
||||
*/
|
||||
public PGpoint center;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This is the radius
|
||||
*/
|
||||
double radius;
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param x coordinate of centre
|
||||
* @param y coordinate of centre
|
||||
* @param r radius of circle
|
||||
@@ -30,7 +30,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
this(new PGpoint(x, y), r);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param c PGpoint describing the circle's centre
|
||||
* @param r radius of circle
|
||||
*/
|
||||
@@ -41,7 +41,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
this.radius = r;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This constructor is used by the driver.
|
||||
*/
|
||||
public PGcircle()
|
||||
@@ -59,7 +59,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
setType("circle");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -94,7 +94,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -102,7 +102,7 @@ public class PGcircle extends PGobject implements Serializable, Cloneable
|
||||
return new PGcircle((PGpoint)center.clone(), radius);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGcircle in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
@@ -4,7 +4,7 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This implements a line consisting of two points.
|
||||
*
|
||||
* Currently line is not yet implemented in the backend, but this class
|
||||
@@ -12,12 +12,12 @@ import org.postgresql.util.*;
|
||||
*/
|
||||
public class PGline extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* These are the two points.
|
||||
*/
|
||||
public PGpoint point[] = new PGpoint[2];
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param x1 coordinate for first point
|
||||
* @param y1 coordinate for first point
|
||||
* @param x2 coordinate for second point
|
||||
@@ -28,7 +28,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
this(new PGpoint(x1, y1), new PGpoint(x2, y2));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param p1 first point
|
||||
* @param p2 second point
|
||||
*/
|
||||
@@ -39,7 +39,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
this.point[1] = p2;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* reuired by the driver
|
||||
*/
|
||||
public PGline()
|
||||
@@ -57,7 +57,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
setType("line");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Definition of the line segment in PostgreSQL's syntax
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
point[1] = new PGpoint(t.getToken(1));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -94,7 +94,7 @@ public class PGline extends PGobject implements Serializable, Cloneable
|
||||
return new PGline((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGline in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
@@ -4,17 +4,17 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This implements a lseg (line segment) consisting of two points
|
||||
*/
|
||||
public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* These are the two points.
|
||||
*/
|
||||
public PGpoint point[] = new PGpoint[2];
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param x1 coordinate for first point
|
||||
* @param y1 coordinate for first point
|
||||
* @param x2 coordinate for second point
|
||||
@@ -25,7 +25,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
this(new PGpoint(x1, y1), new PGpoint(x2, y2));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param p1 first point
|
||||
* @param p2 second point
|
||||
*/
|
||||
@@ -36,7 +36,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
this.point[1] = p2;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -46,7 +46,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* reuired by the driver
|
||||
*/
|
||||
public PGlseg()
|
||||
@@ -54,7 +54,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
setType("lseg");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Definition of the line segment in PostgreSQL's syntax
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
point[1] = new PGpoint(t.getToken(1));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -83,7 +83,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -91,7 +91,7 @@ public class PGlseg extends PGobject implements Serializable, Cloneable
|
||||
return new PGlseg((PGpoint)point[0].clone(), (PGpoint)point[1].clone());
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGlseg in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
@@ -4,22 +4,22 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This implements a path (a multiple segmented line, which may be closed)
|
||||
*/
|
||||
public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* True if the path is open, false if closed
|
||||
*/
|
||||
public boolean open;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The points defining this path
|
||||
*/
|
||||
public PGpoint points[];
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param points the PGpoints that define the path
|
||||
* @param open True if the path is open, false if closed
|
||||
*/
|
||||
@@ -30,7 +30,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
this.open = open;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Required by the driver
|
||||
*/
|
||||
public PGpath()
|
||||
@@ -38,7 +38,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
setType("path");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -48,7 +48,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Definition of the path in PostgreSQL's syntax
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -75,7 +75,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
points[p] = new PGpoint(t.getToken(p));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -100,7 +100,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -111,7 +111,7 @@ public class PGpath extends PGobject implements Serializable, Cloneable
|
||||
return new PGpath(ary, open);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This returns the polygon in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
@@ -6,7 +6,7 @@ import java.sql.*;
|
||||
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This implements a version of java.awt.Point, except it uses double
|
||||
* to represent the coordinates.
|
||||
*
|
||||
@@ -14,17 +14,17 @@ import org.postgresql.util.*;
|
||||
*/
|
||||
public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* The X coordinate of the point
|
||||
*/
|
||||
public double x;
|
||||
|
||||
/**
|
||||
/*
|
||||
* The Y coordinate of the point
|
||||
*/
|
||||
public double y;
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param x coordinate
|
||||
* @param y coordinate
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This is called mainly from the other geometric types, when a
|
||||
* point is imbeded within their definition.
|
||||
*
|
||||
@@ -47,7 +47,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
setValue(value);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Required by the driver
|
||||
*/
|
||||
public PGpoint()
|
||||
@@ -55,7 +55,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
setType("point");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Definition of this point in PostgreSQL's syntax
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -87,7 +87,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -95,7 +95,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
return new PGpoint(x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGpoint in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
@@ -103,7 +103,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
return "(" + x + "," + y + ")";
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Translate the point with the supplied amount.
|
||||
* @param x integer amount to add on the x axis
|
||||
* @param y integer amount to add on the y axis
|
||||
@@ -113,7 +113,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
translate((double)x, (double)y);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Translate the point with the supplied amount.
|
||||
* @param x double amount to add on the x axis
|
||||
* @param y double amount to add on the y axis
|
||||
@@ -124,7 +124,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
this.y += y;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Moves the point to the supplied coordinates.
|
||||
* @param x integer coordinate
|
||||
* @param y integer coordinate
|
||||
@@ -134,7 +134,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
setLocation(x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Moves the point to the supplied coordinates.
|
||||
* @param x double coordinate
|
||||
* @param y double coordinate
|
||||
@@ -145,7 +145,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Moves the point to the supplied coordinates.
|
||||
* refer to java.awt.Point for description of this
|
||||
* @param x integer coordinate
|
||||
@@ -157,7 +157,7 @@ public class PGpoint extends PGobject implements Serializable, Cloneable
|
||||
move((double)x, (double)y);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Moves the point to the supplied java.awt.Point
|
||||
* refer to java.awt.Point for description of this
|
||||
* @param p Point to move to
|
||||
|
@@ -4,17 +4,17 @@ import java.io.*;
|
||||
import java.sql.*;
|
||||
import org.postgresql.util.*;
|
||||
|
||||
/**
|
||||
/*
|
||||
* This implements the polygon datatype within PostgreSQL.
|
||||
*/
|
||||
public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
{
|
||||
/**
|
||||
/*
|
||||
* The points defining the polygon
|
||||
*/
|
||||
public PGpoint points[];
|
||||
|
||||
/**
|
||||
/*
|
||||
* Creates a polygon using an array of PGpoints
|
||||
*
|
||||
* @param points the points defining the polygon
|
||||
@@ -25,7 +25,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
this.points = points;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s definition of the circle in PostgreSQL's syntax.
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -35,7 +35,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
setValue(s);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Required by the driver
|
||||
*/
|
||||
public PGpolygon()
|
||||
@@ -43,7 +43,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
setType("polygon");
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param s Definition of the polygon in PostgreSQL's syntax
|
||||
* @exception SQLException on conversion failure
|
||||
*/
|
||||
@@ -56,7 +56,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
points[p] = new PGpoint(t.getToken(p));
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @param obj Object to compare with
|
||||
* @return true if the two boxes are identical
|
||||
*/
|
||||
@@ -78,7 +78,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* This must be overidden to allow the object to be cloned
|
||||
*/
|
||||
public Object clone()
|
||||
@@ -89,7 +89,7 @@ public class PGpolygon extends PGobject implements Serializable, Cloneable
|
||||
return new PGpolygon(ary);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* @return the PGpolygon in the syntax expected by org.postgresql
|
||||
*/
|
||||
public String getValue()
|
||||
|
Reference in New Issue
Block a user