001/******************************************************************************* 002 * Copyright 2018 The MIT Internet Trust Consortium 003 * 004 * Portions copyright 2011-2013 The MITRE Corporation 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 *******************************************************************************/ 018/** 019 * 020 */ 021package org.mitre.openid.connect.model; 022 023import javax.persistence.Basic; 024import javax.persistence.Column; 025import javax.persistence.Entity; 026import javax.persistence.GeneratedValue; 027import javax.persistence.GenerationType; 028import javax.persistence.Id; 029import javax.persistence.NamedQueries; 030import javax.persistence.NamedQuery; 031import javax.persistence.Table; 032 033/** 034 * @author jricher 035 * 036 */ 037@Entity 038@Table(name="blacklisted_site") 039@NamedQueries({ 040 @NamedQuery(name = BlacklistedSite.QUERY_ALL, query = "select b from BlacklistedSite b") 041}) 042public class BlacklistedSite { 043 044 public static final String QUERY_ALL = "BlacklistedSite.getAll"; 045 046 // unique id 047 private Long id; 048 049 // URI pattern to black list 050 private String uri; 051 052 public BlacklistedSite() { 053 054 } 055 056 /** 057 * @return the id 058 */ 059 @Id 060 @GeneratedValue(strategy = GenerationType.IDENTITY) 061 @Column(name = "id") 062 public Long getId() { 063 return id; 064 } 065 066 /** 067 * @param id the id to set 068 */ 069 public void setId(Long id) { 070 this.id = id; 071 } 072 073 @Basic 074 @Column(name="uri") 075 public String getUri() { 076 return uri; 077 } 078 079 public void setUri(String uri) { 080 this.uri = uri; 081 } 082 083 084}