CCM NG: Shortcut: changed table names and Columns to upperCase and added ShortcutRepository.java
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@3659 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
71e97ccb7d
commit
ba743982a8
|
|
@ -29,27 +29,28 @@ import javax.persistence.GeneratedValue;
|
||||||
import javax.persistence.GenerationType;
|
import javax.persistence.GenerationType;
|
||||||
import javax.persistence.Id;
|
import javax.persistence.Id;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
import org.libreccm.core.CcmObject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(schema ="ccm_shortcuts", name = "shortcuts")
|
@Table(schema ="CCM_SHORTCUTS", name = "SHORTCUTS")
|
||||||
public class Shortcut implements Serializable {
|
public class Shortcut implements Serializable {
|
||||||
|
|
||||||
private static final long serialVersionUID = -5674633339633714327L;
|
private static final long serialVersionUID = -5674633339633714327L;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "shortcut_id")
|
@Column(name = "SHORTCUTS_ID")
|
||||||
@GeneratedValue(strategy = GenerationType.AUTO)
|
@GeneratedValue(strategy = GenerationType.AUTO)
|
||||||
private long shortcutId;
|
private long shortcutId;
|
||||||
|
|
||||||
@Column(name = "url_key", length = 1024)
|
@Column(name = "URL_KEY", length = 1024)
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
private String urlKey;
|
private String urlKey;
|
||||||
|
|
||||||
@Column(name = "redirect", length = 1024)
|
@Column(name = "REDIRECT", length = 1024)
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
private String redirect;
|
private String redirect;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,39 @@
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2015 LibreCCM Foundation.
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||||||
|
* MA 02110-1301 USA
|
||||||
|
*/
|
||||||
|
package org.libreccm.shortcuts;
|
||||||
|
|
||||||
|
import org.libreccm.core.AbstractEntityRepository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author <a href="konerman@tzi.de">Alexander Konermann</a>
|
||||||
|
*/
|
||||||
|
public class ShortcutRepository extends AbstractEntityRepository<Long, Shortcut> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Class<Shortcut> getEntityClass() {
|
||||||
|
return Shortcut.class;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isNew(final Shortcut entity) {
|
||||||
|
return entity.getShortcutId() == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -27,7 +27,7 @@ import org.libreccm.web.Application;
|
||||||
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
* @author <a href="mailto:jens.pelzetter@googlemail.com">Jens Pelzetter</a>
|
||||||
*/
|
*/
|
||||||
@Entity
|
@Entity
|
||||||
@Table(schema ="ccm_shortcuts", name = "shortcuts_app")
|
@Table(schema ="CCM_SHORTCUTS", name = "SHORTCUTS_APP")
|
||||||
public class Shortcuts extends Application {
|
public class Shortcuts extends Application {
|
||||||
private static final long serialVersionUID = -6793265996161649637L;
|
private static final long serialVersionUID = -6793265996161649637L;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
create table shortcuts (
|
create table SHORTCUTS (
|
||||||
shortcut_id bigint generated by default as identity,
|
shortcut_id bigint generated by default as identity,
|
||||||
redirect varchar(1024),
|
redirect varchar(1024),
|
||||||
url_key varchar(1024),
|
url_key varchar(1024),
|
||||||
primary key (shortcut_id)
|
primary key (shortcut_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table shortcuts_app (
|
create table SHORTCUTS_APP (
|
||||||
object_id bigint not null,
|
object_id bigint not null,
|
||||||
primary key (object_id)
|
primary key (object_id)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
create table shortcuts (
|
create table SHORTCUTS (
|
||||||
shortcut_id number(19,0) not null,
|
shortcut_id number(19,0) not null,
|
||||||
redirect varchar2(1024 char),
|
redirect varchar2(1024 char),
|
||||||
url_key varchar2(1024 char),
|
url_key varchar2(1024 char),
|
||||||
primary key (shortcut_id)
|
primary key (shortcut_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table shortcuts_app (
|
create table SHORTCUTS_APP (
|
||||||
object_id number(19,0) not null,
|
object_id number(19,0) not null,
|
||||||
primary key (object_id)
|
primary key (object_id)
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
create table shortcuts (
|
create table SHORTCUTS (
|
||||||
shortcut_id int8 not null,
|
shortcut_id int8 not null,
|
||||||
redirect varchar(1024),
|
redirect varchar(1024),
|
||||||
url_key varchar(1024),
|
url_key varchar(1024),
|
||||||
primary key (shortcut_id)
|
primary key (shortcut_id)
|
||||||
);
|
);
|
||||||
|
|
||||||
create table shortcuts_app (
|
create table SHORTCUTS_APP (
|
||||||
object_id int8 not null,
|
object_id int8 not null,
|
||||||
primary key (object_id)
|
primary key (object_id)
|
||||||
);
|
);
|
||||||
Loading…
Reference in New Issue