~ubuntu-branches/ubuntu/wily/libpgjava/wily

« back to all changes in this revision

Viewing changes to src/interfaces/jdbc/org/postgresql/geometric/PGpoint.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2005-04-21 14:25:11 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050421142511-wibh5vc31fkrorx7
Tags: 7.4.7-3
Built with sources...

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------------------------------------------------------
 
2
 *
 
3
 * PGline.java
 
4
 *     It maps to the point datatype in org.postgresql.
 
5
 *
 
6
 * Copyright (c) 2003, PostgreSQL Global Development Group
 
7
 *
 
8
 * IDENTIFICATION
 
9
 *        $Header: /cvsroot/pgsql/src/interfaces/jdbc/org/postgresql/geometric/Attic/PGpoint.java,v 1.6 2003/09/13 04:02:15 barry Exp $
 
10
 *
 
11
 *-------------------------------------------------------------------------
 
12
 */
1
13
package org.postgresql.geometric;
2
14
 
 
15
import org.postgresql.util.PGobject;
 
16
import org.postgresql.util.PGtokenizer;
 
17
import org.postgresql.util.PSQLException;
 
18
import org.postgresql.util.PSQLState;
 
19
 
3
20
import java.awt.Point;
4
 
import java.io.*;
5
 
import java.sql.*;
6
 
 
7
 
import org.postgresql.util.*;
 
21
import java.io.Serializable;
 
22
import java.sql.SQLException;
8
23
 
9
24
/*
10
25
 * This implements a version of java.awt.Point, except it uses double
11
26
 * to represent the coordinates.
12
 
 *
13
 
 * <p>It maps to the point datatype in org.postgresql.
14
27
 */
15
28
public class PGpoint extends PGobject implements Serializable, Cloneable
16
29
{
69
82
                }
70
83
                catch (NumberFormatException e)
71
84
                {
72
 
                        throw new PSQLException("postgresql.geo.point", e.toString());
 
85
                        throw new PSQLException("postgresql.geo.point", PSQLState.DATA_TYPE_MISMATCH, e.toString());
73
86
                }
74
87
        }
75
88